Skip to main content

Engelbert Tejeda

Engelbert Tejeda's Public Library

35 minutes ago

gls*"keepass" "html5"
"I am pleased to announce the availability of BrowsePass Chrome app.

This is an easier way to set BrowsePass up on the Google Chrome browser (as well as its open source cousin Chromium). The Chrome app alleviates the most cumbersome steps in setting up BrowsePass: finding a web host for the source code. Everything else remains the same, including the convenience of opening your password database with a browser.

Though there is not yet extension/add-on/app for other browsers (such as Firefox, Safari, Opera), they can still run BrowsePass normally.

As usual, the source code (including the Chrome app) is at BitBucket."

38 minutes ago

kwd:{"Bryant is incorrect - you DO NOT need 2 licenses for two VMs in 2012.  

A key is not a license.  A key enables your license.  You can use the same key for multiple installs.  If you use it too many times or potentially on different hardware you may have problems - but even then, you can usually call Microsoft and provided the key hasn't been stolen, they will usually help you.

If you are audited, you must be able to provide proof that you your usage is in line with the licenses you own."
kwd:{microsoft uses an honor system

about 1 hour ago

gls*"dcpromo /forceremoval" "KRB_AP_ERR_MODIFIED"
"When I ran
dcdiag /test:connectivity /
I got:
Domain Controller Diagnosis
Performing initial setup:
   [] LDAP bind failed with error 8341
   A directory service error has occurred
So I decide to demote:
dcpromo /forceremoval
When I re-run
dcdiag /test:connectivity /
domain demotion unsuccessful, remove data in Active Directory after – see here"

about 1 hour ago

gls*"setspn -A" "dcpromo /forceremoval"
kwd:{"Transferring the Flexible Single Master Operation Role

The transfer of an FSMO role is the suggested form of moving a FSMO role between domain controllers and can be initiated by the administrator or by demoting a domain controller, but is not initiated automatically by the operating system. This includes a server in a shut-down state. FSMO roles are not automatically relocated during the shutdown process–this must be considered when shutting down a domain controller that has an FSMO role for maintenance, for example.

In a graceful transfer of an FSMO role between two domain controllers, a synchronization of the data that is maintained by the FSMO role owner to the server receiving the FSMO role is performed prior to transferring the role to ensure that any changes have been recorded before the role change.

Operational attributes are attributes that translate into an action on the server. This type of attribute is not defined in the schema, but is instead maintained by the server and intercepted when a client attempts to read or write to it. When the attribute is read, generally the result is a calculated result from the server. When the attribute is written, a pre-defined action occurs on the domain controller.

The following operational attributes are used to transfer FSMO roles and are located on the RootDSE (or Root DSA Specific Entry–the root of the Active Directory tree for a given domain controller where specific information about the domain controller is kept). In the operation of writing to the appropriate operational attribute on the domain controller to receive the FSMO role, the old domain controller is demoted and and the new domain controller is promoted automatically. No manual intervention is required. The operational attributes that represent the FSMO roles are:


If the administrator specifies the server to receive the FSMO role using a tool such as Ntdsutil, the exchange of the FSMO role is defined between the current owner and the domain controller specified by the administrator.
When a domain controller is demoted, the operational attribute “GiveAwayAllFsmoRoles” is written, which triggers the domain controller to locate other domain controllers to offload any roles it currently owns. Windows 2000 determines which roles the domain controller being demoted currently owns and locates a suitable domain controller by following these rules:

Locate a server in the same site.
Locate a server to which there is RPC connectivity.
Use a server over an asynchronous transport (such as SMTP).
In all transfers, if the role is a domain-specific role, the role can be moved only to another domain controller in the same domain. Otherwise, any domain controller in the enterprise is a candidate.

Seizing the Flexible Single Master Operation Role

Administrators should use extreme caution in seizing FSMO roles. This operation, in most cases, should be performed only if the original FSMO role owner will not be brought back into the environment.
When the administrator seizes an FSMO role from an existing computer, the “fsmoRoleOwner” attribute is modified on the object that represents the root of the data directly bypassing synchronization of the data and graceful transfer of the role. The “fsmoRoleOwner” attribute of each of the following objects is written with the Distinguished Name (DN) of the NTDS Settings object (the data in the Active Directory that defines a computer as a domain controller) of the domain controller that is taking ownership of that role. As replication of this change starts to spread, other domain controllers learn of the FSMO role change.

Primary Domain Controller (PDC) FSMO:


RID Master FSMO:


Schema Master FSMO:


Infrastructure Master FSMO:


Domain Naming Master FSMO:


For example, if Server1 is the PDC in the domain and is retired and the administrator is unable to demote the computer properly, Server2 needs to be assigned the FSMO role of the PDC. After the seizure of the role takes place, the value

CN=NTDS Settings,CN=SERVER2,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=Microsoft,DC=Com"

about 5 hours ago

gls*grep and condition
"Grep AND

5. Grep AND using -E ‘pattern1.*pattern2′

There is no AND operator in grep. But, you can simulate AND using grep -E option.

grep -E 'pattern1.*pattern2' filename
grep -E 'pattern1.*pattern2|pattern2.*pattern1' filename
The following example will grep all the lines that contain both “Dev” and “Tech” in it (in the same order).

$ grep -E 'Dev.*Tech' employee.txt
200 Jason Developer Technology $5,500"

about 5 hours ago

gls*bit flips nasa
kwd:{"Engineers were able to replicate the glitch in a computer lab, showing that a

single bit flip was responsible. NASA plans to reset Voyager’s memory tomorrow.

The spacecraft is so far away it takes nearly 13 hours for a

radio signal from Earth, traveling at the speed of light, to reach it, and

another 13 hours to receive a response."

about 5 hours ago

gls*"import requests" "jira"
kwd:{"import requests
url = "http://localhost:8080/jira/rest/api/2/issue/TEST-1"
r = requests.get(url, auth=("admin", "admin"))
print r.status_code
print r.json()"

about 5 hours ago

gls*"import requests" "jira"
kwd:{"# ===============
# greeting.txt
# ===============
hello, world
# ===============
# ===============
import requests
import json
# [JIRA-BASE-URL], i.e.: http://localhost:8080
# [ISSUE-ID], i.e.: ATT-1
url = '[JIRA-BASE-URL]/rest/api/2/issue/[ISSUE-ID]/attachments'
headers = {"X-Atlassian-Token": "nocheck"}
# please uncomment to attach external file
files = {'file': open('greeting.txt', 'rb')}
# upload file to issue
# [USERNAME], i.e.: admin
# [PASSWORD], i.e.: admin
r =, auth=('[USERNAME]', '[PASSWORD]'), files=files, headers=headers)

about 5 hours ago

gls*"import requests" "jira"
import argparse
import getpass
import sys
import json
import keyring
import requests
# Globals
def pprint(data):
    Pretty prints json data.
    print json.dumps(
        sort_keys = True,
        indent = 4,
        separators = (', ', ' : '))
def get_page_ancestors(auth, pageid):
    # Get basic page information plus the ancestors property
    url = '{base}/{pageid}?expand=ancestors'.format(
        base = BASE_URL,
        pageid = pageid)
    r = requests.get(url, auth = auth)
    return r.json()['ancestors']
def get_page_info(auth, pageid):
    url = '{base}/{pageid}'.format(
        base = BASE_URL,
        pageid = pageid)
    r = requests.get(url, auth = auth)
    return r.json()
def write_data(auth, html, pageid, title = None):
    info = get_page_info(auth, pageid)
    ver = int(info['version']['number']) + 1
    ancestors = get_page_ancestors(auth, pageid)
    anc = ancestors[-1]
    del anc['_links']
    del anc['_expandable']
    del anc['extensions']
    if title is not None:
        info['title'] = title
    data = {
        'id' : str(pageid),
        'type' : 'page',
        'title' : info['title'],
        'version' : {'number' : ver},
        'ancestors' : [anc],
        'body'  : {
            'storage' :
                'representation' : 'storage',
                'value' : str(html),
    data = json.dumps(data)
    url = '{base}/{pageid}'.format(base = BASE_URL, pageid = pageid)
    r = requests.put(
        data = data,
        auth = auth,
        headers = { 'Content-Type' : 'application/json' }
    print "Wrote '%s' version %d" % (info['title'], ver)
    print "URL: %s%d" % (VIEW_URL, pageid)
def get_login(username = None):
    Get the password for username out of the keyring.
    if username is None:
        username = getpass.getuser()
    passwd = keyring.get_password('confluence_script', username)
    if passwd is None:
        passwd = getpass.getpass()
        keyring.set_password('confluence_script', username, passwd)
    return (username, passwd)
def main():
    parser = argparse.ArgumentParser()
        default = getpass.getuser(),
        help = "Specify the username to log into Confluence")
        default = None,
        type = str,
        help = "Specify a new title")
        default = None,
        type = str,
        help = "Write the contents of FILE to the confluence page")
        type = int,
        help = "Specify the Conflunce page id to overwrite")
        type = str,
        default = None,
        nargs = '?',
        help = "Write the immediate html string to confluence page")
    options = parser.parse_args()
    auth = get_login(options.user)
    if options.html is not None and options.file is not None:
        raise RuntimeError(
            "Can't specify both a file and immediate html to write to page!")
    if options.html:
        html = options.html
        with open(options.file, 'r') as fd:
            html =
    write_data(auth, html, options.pageid, options.title)
if __name__ == "__main__" : main()"

Feb 10, 16

gls*cmd variable result command
kwd:{"D:\> FOR /F "delims=" %i IN ('date /t') DO set today=%i
D:\> echo %today%
Sat 20/09/2008"

Feb 10, 16

kwd:{FOR /F "delims=" %%i IN ('tasklist /FI "USERNAME eq %username%" /FI "IMAGENAME eq myprocess.exe" /NH') DO set MatchedProcesses=%%i
if ["%MatchedProcesses%"]==["INFO: No tasks are running which match the specified criteria."] start "" %~dp0..\myprocess.exe

Feb 10, 16

gls* "Puppet::Util::FileType::FileTypeFlat"
Status changed from Needs More Information to Closed
The puppet agent is definitely running as root.

At any rate, I think I’ve solved the issue.

Despite the puppet agent running as root, and it was unable to change the ownership of “/home/joe/.ssh/authorized_keys”.

Manually changing the ownership of file fixed the issue. At least for now.

Thanks for your help."

Feb 10, 16

gls*git list remote branches
kwd:{"UPDATE: The comments have enlightened me quite a bit…there seems to always be more than one way to skin a cat using Git. The easiest way is just to use the git branch commands’ various options. -a shows all local and remote branches, while -r shows only remote branches."

1 - 20 of 24729 Next › Last »
20 items/page

Diigo is about better ways to research, share and collaborate on information. Learn more »

Join Diigo