Mini Searches with Answers

September 9th, 2012  / Author: Greg Pinero (Primary Searcher)

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

OGF DRMAA Working Group
Write once, run anywhere for grid engine job submissions. And there’s a Python wrapper!

Map FTP drive as local disk drive – FTPUSE
A good way to map an FTP folder as a drive in Windows?

Blog / technologia, english / Authentication in AngularJS (or similar) based application. – Espeo Software
This seems to be the only reasonable answer I came across on how to do user authentication with Angular JS.

witoldsz/angular-http-auth · GitHub
More user authentication for Angular JS.

weight watchers Conair body fat scale
how to enter body fat mode. how to measure body fat on his scale. v17083
074108025272

Tags: , , , , , , , , , , , , , , , , ,

Mini Searches with Answers

August 21st, 2012  / Author: Greg Pinero (Primary Searcher)

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

gzip don’t delete original file
The command will then replace the original file with a new, usually smaller file called file.txt.gz. To keep the original file file.txt, it is necessary to use the -c option and redirect the output to a new file.

Subversion – Checkout Older Revision
How to go back to an older version of a file in SVN. This actually took me almost an hour to figure out!

How can I view all historical changes to a file in SVN – Stack Overflow
A really useful bash script to view all changes to a file in SVN at once!

Pyjnius: Accessing Java classes from Python | Txzone
A potential replacement for jpype??

Tags: , , , , , , , , , , ,

Mini Searches with Answers

August 13th, 2012  / Author: Greg Pinero (Primary Searcher)

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

django – Issue with ManyToMany Relationships not updating inmediatly after save – Stack Overflow
So the save method sees the old m2m data when saved from admin. There aren’t any great answers here.

How does the MySQL Average function treat nulls?
SQL is smart about this – the AVG() function knows the difference between NULL and 0. It knows that NULL is not a number, and should not be counted in the final average. It knows that 0 is a number, and should be counted in the average.

What do the ls colors mean?
Executable files: Green
* Normal file : Normal
* Directory: Blue
* Symbolic link : Cyan
* Pipe: Yellow
* Socket: Magenta
* Block device driver: Bold yellow foreground, with black background
* Character device driver: Bold yellow foreground, with black background
* Orphaned syminks : Blinking Bold white with red background
* Missing links ( … and the files they point to) : Blinking Bold white with red background
* Archives or compressed : Red (.tar, .gz, .zip, .rpm)
* Image files : Magenta (.jpg, gif, bmp, png, tif)

Wehr in the World: Edward Tufte course notes and reactions
A good list of notes/take-aways from the 1-day Tufte course.

Tags: , , , , , , , , , , , ,

Mini Searches with Answers

August 12th, 2012  / Author: Greg Pinero (Primary Searcher)

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

Using git stash branch – Arjan’s tumblelog
Scenario: You started working in master but realize your work belongs in a branch (and you haven’t committed yet .. I think)

git stash
git stash branch my_branch_title

How to use the du command — by The Linux Information Project (LINFO)
I found this command was best to see a summary of one directory below my current one:

du –max-depth=1

MySQL Run SQL Queries From A Shell Prompt / Command Line
$ mysql -u vivek -p -e ‘SELECT COUNT(*) FROM quotes’ cbzquotes

Gumroad API – Authentication
This is a very good example of designing a simple, intuitive REST api.

How to install python-ldap in Mac OS X Lion
I found this solution worked instead of following the instructions on this page:

$ sudo env ARCHFLAGS=’-arch i386 -arch x86_64′ easy_install python-ldap==2.3.13

For future hapless searchers here is the output from my first failed install attempt:

pinerog-lm1:pip-1.1 pinerog$ sudo pip install python-ldap
Downloading/unpacking python-ldap
Downloading python-ldap-2.4.9.tar.gz (133Kb): 133Kb downloaded
Running setup.py egg_info for package python-ldap
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args:
extra_objects:
include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
library_dirs: /opt/openldap-RE24/lib /usr/lib
libs: ldap_r
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
warning: no files found matching ‘Makefile’
warning: no files found matching ‘Modules/LICENSE’
Requirement already satisfied (use –upgrade to upgrade): setuptools in /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python (from python-ldap)
Installing collected packages: python-ldap
Running setup.py install for python-ldap
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args:
extra_objects:
include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
library_dirs: /opt/openldap-RE24/lib /usr/lib
libs: ldap_r
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
warning: no files found matching ‘Makefile’
warning: no files found matching ‘Modules/LICENSE’
building ‘_ldap’ extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.9 -IModules -I/opt/openldap-RE24/include -I/usr/include/sasl -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c Modules/LDAPObject.c -o build/temp.macosx-10.6-universal-2.6/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:18:
/usr/include/sasl/sasl.h:347: warning: function declaration isn’t a prototype
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
In file included from Modules/LDAPObject.c:18:
/usr/include/sasl/sasl.h:347: warning: function declaration isn’t a prototype
Modules/LDAPObject.c:1382: fatal error: error writing to -: Broken pipe
compilation terminated.
In file included from Modules/LDAPObject.c:18:
/usr/include/sasl/sasl.h:347: warning: function declaration isn’t a prototype
lipo: can’t open input file: /var/tmp//ccEZK6OJ.out (No such file or directory)
error: command ‘gcc-4.2′ failed with exit status 1
Complete output from command /usr/bin/python -c “import setuptools;__file__=’/Users/pinerog/Downloads/pip-1.1/build/python-ldap/setup.py’;exec(compile(open(__file__).read().replace(‘rn’, ‘n’), __file__, ‘exec’))” install –single-version-externally-managed –record /tmp/pip-mZcNF_-record/install-record.txt:
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R

extra_compile_args:

extra_objects:

include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include

library_dirs: /opt/openldap-RE24/lib /usr/lib

libs: ldap_r

running install

running build

running build_py

file Lib/ldap.py (for module ldap) not found

file Lib/ldap/controls.py (for module ldap.controls) not found

file Lib/ldap/extop.py (for module ldap.extop) not found

file Lib/ldap/schema.py (for module ldap.schema) not found

creating build/lib.macosx-10.6-universal-2.6

copying Lib/ldapurl.py -> build/lib.macosx-10.6-universal-2.6

copying Lib/ldif.py -> build/lib.macosx-10.6-universal-2.6

copying Lib/dsml.py -> build/lib.macosx-10.6-universal-2.6

creating build/lib.macosx-10.6-universal-2.6/ldap

copying Lib/ldap/__init__.py -> build/lib.macosx-10.6-universal-2.6/ldap

copying Lib/ldap/async.py -> build/lib.macosx-10.6-universal-2.6/ldap

creating build/lib.macosx-10.6-universal-2.6/ldap/controls

copying Lib/ldap/controls/__init__.py -> build/lib.macosx-10.6-universal-2.6/ldap/controls

copying Lib/ldap/controls/libldap.py -> build/lib.macosx-10.6-universal-2.6/ldap/controls

copying Lib/ldap/controls/ppolicy.py -> build/lib.macosx-10.6-universal-2.6/ldap/controls

copying Lib/ldap/controls/psearch.py -> build/lib.macosx-10.6-universal-2.6/ldap/controls

copying Lib/ldap/controls/readentry.py -> build/lib.macosx-10.6-universal-2.6/ldap/controls

copying Lib/ldap/controls/sessiontrack.py -> build/lib.macosx-10.6-universal-2.6/ldap/controls

copying Lib/ldap/controls/simple.py -> build/lib.macosx-10.6-universal-2.6/ldap/controls

copying Lib/ldap/cidict.py -> build/lib.macosx-10.6-universal-2.6/ldap

copying Lib/ldap/dn.py -> build/lib.macosx-10.6-universal-2.6/ldap

creating build/lib.macosx-10.6-universal-2.6/ldap/extop

copying Lib/ldap/extop/__init__.py -> build/lib.macosx-10.6-universal-2.6/ldap/extop

copying Lib/ldap/extop/dds.py -> build/lib.macosx-10.6-universal-2.6/ldap/extop

copying Lib/ldap/filter.py -> build/lib.macosx-10.6-universal-2.6/ldap

copying Lib/ldap/functions.py -> build/lib.macosx-10.6-universal-2.6/ldap

copying Lib/ldap/ldapobject.py -> build/lib.macosx-10.6-universal-2.6/ldap

copying Lib/ldap/logger.py -> build/lib.macosx-10.6-universal-2.6/ldap

copying Lib/ldap/modlist.py -> build/lib.macosx-10.6-universal-2.6/ldap

copying Lib/ldap/resiter.py -> build/lib.macosx-10.6-universal-2.6/ldap

copying Lib/ldap/sasl.py -> build/lib.macosx-10.6-universal-2.6/ldap

creating build/lib.macosx-10.6-universal-2.6/ldap/schema

copying Lib/ldap/schema/__init__.py -> build/lib.macosx-10.6-universal-2.6/ldap/schema

copying Lib/ldap/schema/models.py -> build/lib.macosx-10.6-universal-2.6/ldap/schema

copying Lib/ldap/schema/subentry.py -> build/lib.macosx-10.6-universal-2.6/ldap/schema

copying Lib/ldap/schema/tokenizer.py -> build/lib.macosx-10.6-universal-2.6/ldap/schema

copying Lib/ldap/syncrepl.py -> build/lib.macosx-10.6-universal-2.6/ldap

file Lib/ldap.py (for module ldap) not found

file Lib/ldap/controls.py (for module ldap.controls) not found

file Lib/ldap/extop.py (for module ldap.extop) not found

file Lib/ldap/schema.py (for module ldap.schema) not found

running egg_info

writing requirements to Lib/python_ldap.egg-info/requires.txt

writing Lib/python_ldap.egg-info/PKG-INFO

writing top-level names to Lib/python_ldap.egg-info/top_level.txt

writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt

warning: manifest_maker: standard file ‘-c’ not found

file Lib/ldap.py (for module ldap) not found

file Lib/ldap/controls.py (for module ldap.controls) not found

file Lib/ldap/extop.py (for module ldap.extop) not found

file Lib/ldap/schema.py (for module ldap.schema) not found

reading manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’

reading manifest template ‘MANIFEST.in’

warning: no files found matching ‘Makefile’

warning: no files found matching ‘Modules/LICENSE’

writing manifest file ‘Lib/python_ldap.egg-info/SOURCES.txt’

running build_ext

building ‘_ldap’ extension

creating build/temp.macosx-10.6-universal-2.6

creating build/temp.macosx-10.6-universal-2.6/Modules

gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.9 -IModules -I/opt/openldap-RE24/include -I/usr/include/sasl -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c Modules/LDAPObject.c -o build/temp.macosx-10.6-universal-2.6/Modules/LDAPObject.o

In file included from Modules/LDAPObject.c:18:

/usr/include/sasl/sasl.h:347: warning: function declaration isn’t a prototype

/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed

Installed assemblers are:

/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64

/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386

In file included from Modules/LDAPObject.c:18:

/usr/include/sasl/sasl.h:347: warning: function declaration isn’t a prototype

Modules/LDAPObject.c:1382: fatal error: error writing to -: Broken pipe

compilation terminated.

In file included from Modules/LDAPObject.c:18:

/usr/include/sasl/sasl.h:347: warning: function declaration isn’t a prototype

lipo: can’t open input file: /var/tmp//ccEZK6OJ.out (No such file or directory)

error: command ‘gcc-4.2′ failed with exit status 1

—————————————-
Command /usr/bin/python -c “import setuptools;__file__=’/Users/pinerog/Downloads/pip-1.1/build/python-ldap/setup.py’;exec(compile(open(__file__).read().replace(‘rn’, ‘n’), __file__, ‘exec’))” install –single-version-externally-managed –record /tmp/pip-mZcNF_-record/install-record.txt failed with error code 1 in /Users/pinerog/Downloads/pip-1.1/build/python-ldap
Storing complete log in /Users/pinerog/Library/Logs/pip.log

Shinken | The next Industry Standard in IT Monitoring
This seems like a suitable HTTP heartbeat, monitoring tool. Not sure if it can handle logging in though.

Tags: , , , , , , , , , , , , , , , , , , , , , , , , ,

Mini Searches with Answers

August 6th, 2012  / Author: Greg Pinero (Primary Searcher)

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

How to delete a tag from github
For my projects on GitHub I like to have the most recent stable version tagged so that people have an easy download link to it. So when I go from versions 0.4 > 0.5 on project (for instance), I do this:

1) Delete the v0.4 tag locally: git tag -d v0.4
2) Delete the v0.4 tag on GitHub (which removes its download link): git push origin :v0.4
3) Add a new tag for the newest stable release: git tag -a v0.5 -m “Version 0.5 Stable”
4) Push the latest tag to GitHub: git push ––tags

internet explorer 8 – Why isn’t this simple bit of jQuery getJSON working in IE8? – Stack Overflow
I couldn’t get jQuery’s getJSON call to work in IE8. It turns out I have to change the charset in my header from utf8 to UTF-8. Stupid.

Here’s the new header for my view generating the JSON:
‘Content-Type: text/javascript; charset=UTF-8′

extras/slurp_article.pod – search.cpan.org
This seems like the best way to read the contents of a file into a variable in one line.

my $text = do { local( @ARGV, $/ ) = $file ; } ;

prezjordan/Melopy
A python library for playing with sound

What’s the actual sequence of TN5?
The IE sequence is 5’CTGTCTCTTGATCAGATCT3’ and the OEs sequence is 5’CTGACTCTTATACACAAGT3’ (Bhasin et al., 1999)

Fixing These jQuery | adam j. sontag
How to debug in Javascript

Use Python’s sys.settrace() for fun and for profit « Reminiscential: of or pertaining to remembrance
How to make the Python interpreter call an external function whenever a line of code is being executed.

Perl Debug
My Example debug session:

Set breakpoint on line 276 if $name=@S7CX7:40:266 then step through:

>perl -d msg/parse_BCdata2BWA.pl -b barcodes_file -e null -l Tn5-IonTorrent reads.w_barcodes2.fastq.trim.fastq
(pdb)b 276 $name=~/S7CX7:40:266/
(pdb)c

Shop Troy-Bilt .080″ Trimmer Line at Lowes.com
This is what my Bolens bl110 trimmer calls for (part #49U0134K953) but I can’t find it for sale online anywhere. I’m going to buy a differnt .080 line and hope it’s ok

“does google index gists” – Google Search
I can’t find any information about this but it doesn’t appear to from my searches.

Tags: , , , , , , , , , , , , , , , , , , , , , , ,