This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ nodejs | |
| > a = /\[:[^\]]+:]/g | |
| /\[:[^\]]+:]/g | |
| > b = /\[#[^\]]+#]/g | |
| /\[#[^\]]+#]/g | |
| > test = " shit, [: bitch :] i'm gonna [# kill #] that [# fuked #] ass" | |
| ' shit, [: bitch :] i\'m gonna [# kill #] that [# fuked #] ass' | |
| > test.match(a) | |
| [ '[: bitch :]' ] | |
| > test.match(b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jrwren@delays:{%5}~/src/mmaptest $ ./trmm | |
| 25.449077s wall, 1.610000s user + 1.250000s system = 2.860000s CPU (11.2%) | |
| 2048MB at 80.4745 MB/s | |
| Checksum: 8740270876149790436 | |
| jrwren@delays:{%5}~/src/mmaptest $ ./trmm | |
| 2.157940s wall, 1.500000s user + 0.650000s system = 2.150000s CPU (99.6%) | |
| 2048MB at 949.06 MB/s | |
| Checksum: 8740270876149790436 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ python | |
| Python 2.7.2 (default, Oct 11 2012, 20:14:37) | |
| [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> import logging | |
| >>> console=logging.StreamHandler() | |
| >>> logging.getLogger("").addHandler(console) | |
| >>> logging.getLogger("").info('hi') | |
| >>> logging.getLogger("").warn('hi') | |
| hi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ cat ~/.gitconfig | |
| [user] | |
| name = Jay R. Wren | |
| email = jrwren@xmtp.net | |
| [color] | |
| ui = auto | |
| [alias] | |
| st = status | |
| done = commit -m 'fuckit, git-r-done' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ azure vm create jrwtest b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-12_04_3-LTS-amd64-server-20130916.1-en-us-30GB jwren --location "East US" -e -t id_rsa.PKCS8.pem | |
| info: Executing command vm create | |
| + Looking up image | |
| + Looking up cloud service | |
| warn: --location option will be ignored | |
| + Getting cloud service properties | |
| + Looking up deployment | |
| + Retrieving storage accounts | |
| Enter VM 'jwren' password: ****** | |
| Confirm password: ****** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| code behind: | |
| public IEnumerable<Tuple<int, string, string>> Images; | |
| Page_Load() { | |
| Images = Telerik.Sitefinity.App.WorkWith().Images().Where( | |
| w => w.Album.Title == imgLibrary && w.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live).Get().Select( | |
| (item, index) => Tuple.Create(index,"../../" + item.Description.Value, item.ItemDefaultUrl + ".jpg") | |
| ); | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ python -m SimpleHTTP | |
| python: No module named SimpleHTTP | |
| $ python -m SimpleHttp | |
| python: No module named SimpleHttp | |
| $ python -m SimpleHttpServer | |
| python: No module named SimpleHttpServer | |
| $ python -m SimpleWebServer | |
| python: No module named SimpleWebServer | |
| $ | |
| ... write this gist to clear my head... then... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ curl -I http://t.co/IIvchRkvGc | |
| HTTP/1.1 301 Moved Permanently | |
| cache-control: private,max-age=300 | |
| date: Fri, 04 Oct 2013 01:25:30 GMT | |
| expires: Thu, 01-Jan-1970 00:00:00 GMT | |
| location: http://www.geekgirldiva.com/2013/10/um-did-you-know-someone-makes-star-trek.html | |
| server: tfe | |
| set-cookie: muc=1;Domain=t.co;Expires=Wed, 16-Sep-2015 01:25:30 GMT | |
| Content-Length: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| When I open vim this is what I see: | |
| bad ass code, starin at me | |
| I've got lambdas in my head | |
| and I ain't afraid to show it... | |
| I'm coding and they know it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #cloud-config | |
| runcmd: | |
| - | | |
| echo "#!/usr/bin/python | |
| import boto, sys | |
| boto.connect_s3().get_bucket(sys.argv[0]).get_key(sys.argv[1]).get_contents_to_filename(sys.argv[2]) | |
| ">/usr/bin/s3get | |
| - chmod +x /usr/bin/s3get | |
| - s3get bucket db_dumps/$HOSTNAME-dbname.pg_dump /var/tmp/dbname.pg_dump | |
| - su -c 'pg_restore -d dbname /var/tmp/dbname.pg_dump' postgres |