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
$("button#login").click(function() { | |
DNode.connect(function (remote) { | |
remote.login($("#registerEmail").val(), $("#registerPassword").val(), function(successful_login) { | |
if(successful_login) { | |
console.log('login successful!'); | |
} | |
else { | |
console.log('login failed.'); | |
} | |
}); |
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
zachary@Zachary-Burts-MacBook-Air-2 ~/Code/dnode/examples/web-express[master*]$ npm ls | |
/Applications/MAMP/htdocs/dnode/examples/web-express | |
└─┬ [email protected] | |
├─┬ [email protected] | |
│ └── [email protected] | |
├── [email protected] | |
├── [email protected] | |
├─┬ [email protected] | |
│ ├── [email protected] | |
│ └── [email protected] |
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
server { | |
listen 80; | |
server_name www.compassionpit.org; | |
rewrite ^/(.*) http://www.compassionpit.com/$1 permanent; | |
} | |
server { | |
listen 80; # your server's public IP address | |
server_name www.compassionpit.com; |
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
/** | |
* Submits a POST request to the given URL with the given XML as an attachment. | |
* | |
* @param url | |
* @param xmlContent | |
* @return | |
* @throw IOException | |
* */ | |
public ContentExchange postXML(String url, String xmlContent) throws IOException { | |
HttpClient client = getClient(); |
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
root@localhost:/usr/local/rvm/gems/ruby-2.0.0-p0/gems# gem install memcached | |
Building native extensions. This could take a while... | |
ERROR: Error installing memcached: | |
ERROR: Failed to build gem native extension. | |
/usr/local/rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb | |
extconf.rb:7:in `<main>': Use RbConfig instead of obsolete and deprecated Config. | |
extconf.rb:7:in `<main>': Use RbConfig instead of obsolete and deprecated Config. | |
extconf.rb:8:in `<main>': Use RbConfig instead of obsolete and deprecated Config. | |
extconf.rb:10:in `<main>': Use RbConfig instead of obsolete and deprecated Config. |
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
sample input | |
vol, time, price | |
10, 1:00pm, 5 | |
10, 1:01pm, 5.05 | |
10, 1:03pm, 5.025 | |
10, 1:04pm, 4.99 | |
10, 1:05pm, 4.99499 | |
should give output of... |
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
csv: | |
time, price | |
read in csv; populate array: | |
price_data = [[time,price],[time,price]] | |
sort array on time | |
pct_aggregate = []; | |
pct_aggregate_summed = []; |
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
Zackattack::Application.configure do | |
# Settings specified here will take precedence over those in config/application.rb | |
# Code is not reloaded between requests | |
config.cache_classes = true | |
# Full error reports are disabled and caching is turned on | |
config.consider_all_requests_local = false | |
config.action_controller.perform_caching = true |
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
hermione@localhost:/var/www/laduree/current$ ls -la public/assets/ | |
total 836 | |
drwxrwxr-x 11 hermione hermione 4096 Feb 20 01:10 . | |
drwxrwxr-x 3 hermione hermione 4096 Feb 20 01:07 .. | |
-rw-rw-r-- 1 hermione hermione 493891 Jan 29 21:38 application-96cd30a6dfe95592f924694e874e8ac3.js | |
-rw-rw-r-- 1 hermione hermione 132384 Jan 29 21:38 application-96cd30a6dfe95592f924694e874e8ac3.js.gz | |
-rw-rw-r-- 1 hermione hermione 105384 Feb 20 00:23 application-d5d25d4b43c2c8534e0fedfdc933c0d4.css | |
-rw-rw-r-- 1 hermione hermione 18242 Feb 20 00:23 application-d5d25d4b43c2c8534e0fedfdc933c0d4.css.gz | |
drwxrwxr-x 2 hermione hermione 4096 Feb 20 01:10 blue-on-light | |
drwxrwxr-x 2 hermione hermione 4096 Feb 20 01:10 brand_logos |
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
require 'mysql2' | |
client = Mysql2::Client.new(:host => "localhost", :username => "*USERNAME*", :password => "*PASSWORD*", :database => "*DATABASENAME*", :local_infile => true) | |
puts 'Downloading EOD data' | |
system('curl -J -L -oeod https://www.quandl.com/api/v3/databases/EOD/data?auth_token=**AUTHTOKEN**') | |
puts 'UnZIPPING EOD Data' | |
system('unzip -p eod > eod2') | |
puts 'Filtering out EOD Data before 2014' | |
system('awk -F, \'$2 > "2014" {print}\' eod2 > eod_since_2014') | |
puts 'Dropping the EOD table' | |
client.query("DROP TABLE adj_eod") |
OlderNewer