Skip to main content

Engelbert Tejeda

Engelbert Tejeda's Public Library

6 minutes ago

gls*"fabric" "print" "%s" "stderr"
kwd:{"from fabric.api import local, env
env.warn_only = True # if you want to ignore exceptions and handle them yurself

command = "your command"
x = local(command, capture=True)
if(x.stderr != ""):
error = "On %s: %s" %(command, x.stderr)
print x.return_code # which may be 1 or 2
print error
raise Exception(error) #optional
print "the output of %s is: %s" %(command, x)
print x.return_code # which is 0"

8 minutes ago

gls*chrome from commandline osx
kwd:{"/usr/bin/open -a "/Applications/Google" ''"

10 minutes ago

"When running umount /path I get:

umount: /path: device is busy.
The filesystem is huge, so lsof +D /path is not a realistic option.

lsof /path, lsof +f -- /path, and fuser /path all"

about 5 hours ago

gls* authorization key rejected bacula

about 6 hours ago

gls*hex to dec linux
kwd:{"To convert a number from hexadecimal to decimal:
$ echo $((0x15a))"

about 6 hours ago

gls*"rdmsr 0x3A"
kwd:{"You can use rdmsr from msr-tools to read register IA32_FEATURE_CONTROL (address 0x3a). The kernel module msr has to be loaded for this.

On most Linux systems:

sudo modprobe msr
sudo rdmsr 0x3a
Values 3 and 5 mean it's activated."

about 7 hours ago

gls*"ovirt" "Hardware does not support virtualization"
kwd:{Determine virtualization support from cpu register
rdmsr --bitfield 4:4 0x3A

about 23 hours ago

gls*"bacula" "test authorization key"
kwd:{"Fatal error: Authorization key rejected by Storage daemon 
I've seen this error before on and off on one particular client.
Nothing changes with regard to the configuration and yet the error will
crop up. Usually a combination of the following "fixes" it -
cancel/restart the job, restart the Bacula client, or restart the Bacula
storage daemon. Since it only happens with this one client, I haven't
bothered to try and figure out why exactly. I'd be interested if anyone
has any thoughts on what causes this error to randomly occur. "

Mar 03, 15

kwd:{Remote Control Software, VNC, Keyboard, Mouse, Input, io
"RemoteControl 1.8.1
1.8.1 Release

Here are the changes:


1.) Fixed potential issue for conn.vnc file where it would append the file instead of overwriting it.
2.) Fixed ToDo font so it matches the other tabbed texboxes.
3.) Fixed issue with RealVNC EULA prompt coming up because of new RealVNC version.
4.) New RealVNC version also caused viewer keys to stay behind. This is now also fixed.
5.) Fixed Typo for VNC Viewer Keys and also improved this function.


Download Link:

As always please provide feedback!
Please also let me know if there are more items you feel need added to the ToDo section.


Mar 02, 15

gls*fabric capture output

Mar 02, 15

gls*"fabric" "print" "%s" "stderr"
kwd:{"Lines starting with out are stdout, not stderr.

The problem here is that pty=True is the default behavior, and pty's cause stdout and stderr to mix together.

If you need fine-tuned stdout/stderr control and aren't relying on any programs that care about ptys (would guess not), try run(xxx, pty=False), which should then generate distinct out/err streams."

Mar 02, 15

gls*regex beginning between
If you're searching for hits within a larger text, you don't want to use ^ and $ as some other responders have said; those match the beginning and end of the text. Try this instead:

\b is a word boundary: it matches a position that is either preceded by a word character and not followed by one, or followed by a word character and not preceded by one. This regex will find what you're looking for in any of these strings:

foo dbo.functionName_fn bar
...but not in this one:

\w+ matches one or more "word characters" (letters, digits, or _). If you need something more inclusive, you can try \S+ (one or more non-whitespace characters) or .+? (one or more of any characters except linefeeds, non-greedily). The non-greedy +? prevents it from accidentally matching something like dbo.func1_fn dbo.func2_fn as if it were just one hit."

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

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

Join Diigo