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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 'sinatra' | |
require 'infusionsoft' | |
require 'logger' | |
Infusionsoft.configure do |config| | |
config.api_url = 'XXXX.infusionsoft.com' | |
config.api_key = 'XXXXXXXXXXXXXXX' | |
config.api_logger = Logger.new("./infusionsoft_api.log") | |
end |
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
String serviceType = "0"; | |
switch (this.cboServiceType.Text) | |
{ | |
case "LTL": | |
serviceType = "0"; | |
break; | |
case "LTL and Parcel": | |
serviceType = "1"; | |
break; |
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 'rspec' | |
class CrazyBitch | |
attr_reader :crazy, :condenscending | |
def initialize | |
@crazy = true | |
@condenscending = true | |
end | |
end |
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
File.open('farkles.html','w') do |fuckin_farkles| | |
fuckin_farkles.puts fuckstickles | |
end |
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
function check_stock(what,partnum) | |
{ | |
var soption; | |
var i; | |
var product_availability='<font color="green"><b>In Stock - </b></font><font color="black">Ships Next Business Day</font>'; | |
var backordermode='0'; | |
var avail_instock='<font color="green"><b>In Stock - </b></font><font color="black">Ships Next Business Day</font>'; | |
var avail_outofstock='<font color="black">Out of Stock</font>'; | |
var avail_backorder='<font color="black">Ships in 2-5 days</font>'; | |
var optionfound=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
type TCarrier411 = class(TObject) | |
private | |
fMCNumber: String; // MC # from DRD | |
fSSUID: String; // Session id from c411 | |
public | |
constructor Create(AMC: String); | |
property MCNumber: String | |
read fMCNumber; | |
property SSUID: String | |
read fSSUID write fSSUID; |
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
Object.setPrototypeOf = function (obj, newProto) { | |
var n = Object.create(newProto); | |
Object.getOwnPropertyNames(obj).forEach(function (name) { | |
Object.defineProperty(n, name, Object.getOwnPropertyDescriptor(obj, name)) | |
}); | |
return n | |
} |
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
Postgres 9 with node-postgres and console.log | |
node data_init2.js 6.74s user 1.94s system 37% cpu 23.000 total | |
Mongo 1.8 with mongoose/native | |
node data_init.js 23.20s user 0.68s system 92% cpu 25.936 total | |
Mongo 1.8 with mongoose/native AND --journal | |
node data_init.js 30.87s user 1.25s system 93% cpu 34.254 total |
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 mongoose = require('mongoose'), | |
Schema = mongoose.Schema; | |
mongoose.connect('mongodb://localhost/lol', function(err) { | |
if (err) { console.log(err) } | |
}); | |
var ChatSchema = new Schema({ | |
name: String | |
}); |
NewerOlder