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
| import urllib2 | |
| import json | |
| from pprint import pprint | |
| stop_id = 1200 | |
| pprint(json.load(urllib2.urlopen('http://svc.metrotransit.org/NexTrip/%s?format=json' % stop_id))) |
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
| $ bin/kafka-server-start.sh config/server.properties | |
| Exception in thread "main" java.lang.NoClassDefFoundError: scala/ScalaObject | |
| at java.lang.ClassLoader.defineClass1(Native Method) | |
| at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) | |
| at java.lang.ClassLoader.defineClass(ClassLoader.java:615) | |
| at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) | |
| at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) | |
| at java.net.URLClassLoader.access$000(URLClassLoader.java:58) | |
| at java.net.URLClassLoader$1.run(URLClassLoader.java:197) | |
| at java.security.AccessController.doPrivileged(Native Method) |
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
| $ psql | |
| dyld: Library not loaded: @loader_path/../lib/libssl.dylib | |
| Referenced from: /usr/lib/libpq.5.dylib | |
| Reason: Incompatible library version: libpq.5.dylib requires version 1.0.0 or later, but libssl.0.9.8.dylib provides version 0.9.8 | |
| Trace/BPT trap: 5 | |
| $ uname -a | |
| Darwin sf4229.et.local 11.4.2 Darwin Kernel Version 11.4.2: Wed May 30 20:13:51 PDT 2012; root:xnu-1699.31.2~1/RELEASE_X86_64 x86_64 | |
| $ |
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
| $ echo $USER | |
| eric.lee | |
| $ uname -a | |
| Darwin sf4229.et.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 | |
| sf4229:node-jscoverage eric.lee$ gcc --version | |
| i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00) | |
| Copyright (C) 2007 Free Software Foundation, Inc. | |
| This is free software; see the source for copying conditions. There is NO | |
| warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| $ ./configure |
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
| var sinon = require('sinon'); | |
| var hottap = require('hotttap'); | |
| var foo = function(url) { | |
| var resp = hottap.hottap(url); | |
| return resp; | |
| }; | |
| foo('http://somewhere/over/the/rainbow'); |
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
| I am writing to let you know that I will retire as CEO of Microsoft within the next 12 months, after a successor is chosen. There is never a perfect time for this type of transition, but now is the right time. My original thoughts on timing would have had my retirement happen in the middle of our transformation to a devices and services company focused on empowering customers in the activities they value most. We need a CEO who will be here longer term for this new direction. You can read the press release on Microsoft News Center. | |
| This is a time of important transformation for Microsoft. Our new Senior Leadership team is amazing. The strategy we have generated is first class. Our new organization, which is centered on functions and engineering areas, is right for the opportunities and challenges ahead. | |
| Microsoft is an amazing place. I love this company. I love the way we helped invent and popularize computing and the PC. I love the bigness and boldness of our bets. I love our people and their talent and our |
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
| #!/usr/bin/perl | |
| $_=' | |
| $q ="\ 47"; wh | |
| ile ($ ;= | |
| $z += .5 ){ | |
| %c= $r=0;$/ ="";whi le(2 | |
| 0+ $z>($;+=.05)){$c{int$ _+ 2 | |
| 6+ 2*($ r+= .0 2) * | |
| s in$ ;}{1 -$_ | |
| +1 0+ int $r*c o s |
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 "http://webservices.nextbus.com/service/publicXMLFeed?command=predictions&a=emery&stopId=5300&routeTag=Hollis" | |
| <?xml version="1.0" encoding="utf-8" ?> | |
| <body copyright="All data copyright Emery-Go-Round 2013."> | |
| <predictions agencyTitle="Emery-Go-Round" routeTitle="Hollis" routeTag="Hollis" stopTitle="MacArthur BART Station" stopTag="bart_o" dirTitleBecauseNoPredictions="to Emeryville"> | |
| <message text="Nextbus time will not be accurate due to new vehicles on the road with out the Nextbus equipment. Feel free to call the office at 510-451-3862"/> | |
| </predictions> | |
| </body> | |
| $ : I mean, who doesn't want to make an api call that gives you a phone number to call in an attribute called "text" of a message element |
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
| sudo apt-get install openjdk-7-jdk ; sudo update-alternatives --config java ; ps ax | grep backtype.storm | grep -v grep | awk '{print $1}' | xargs kill -9 ; java -version |
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
| from kazoo.client import KazooClient | |
| zk = KazooClient('mmaster-0:2181,mmaster-1:2181,mmaster-2:2181') | |
| zk.start() | |
| @zk.ChildrenWatch('/') | |
| def watch_children(children): | |
| print('new state: {}'.format('\n'.join(children))) | |
| zk.delete('/marathon', recursive=True) | |
| zk.stop() |