type | description | release type |
---|
This file contains 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
pragma solidity ^0.4.0; | |
contract Loan { | |
uint principal; | |
uint public total; // principal + interest rate | |
uint interest; | |
uint public dueDate; | |
bool public isFunded; | |
bool public isComplete; |
This file contains 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 AWS = require('aws-sdk'); | |
var http = require('http'); | |
var httpProxy = require('http-proxy'); | |
var express = require('express'); | |
var bodyParser = require('body-parser'); | |
var stream = require('stream'); | |
if (process.argv.length != 3) { | |
console.error('usage: aws-es-proxy <my-cluster-endpoint>'); | |
process.exit(1); |
This file contains 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 'tire' | |
# Tire.configure { logger STDERR, level: 'debug' } | |
Tire.index('movie-titles') do | |
delete | |
create \ | |
settings: { | |
index: { | |
analysis: { |
This file contains 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 http = require('http'); | |
var url = require('url'); | |
var crypto = require('crypto'); | |
var AESCrypt = {}; | |
AESCrypt.decrypt = function(cryptkey, iv, encryptdata) { | |
encryptdata = new Buffer(encryptdata, 'base64').toString('binary'); | |
var decipher = crypto.createDecipheriv('aes-128-cbc', cryptkey, iv), | |
decoded = decipher.update(encryptdata, 'binary', 'utf8'); |
This file contains 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 http = require('http'); | |
var NG_PREFIX = ")]}',\n"; | |
http.ServerResponse.prototype.ngJSON = function(obj){ | |
// allow status / body | |
if (2 == arguments.length) { | |
// res.json(body, status) backwards compat | |
if ('number' == typeof arguments[1]) { | |
this.statusCode = arguments[1]; |
- Make sure you have yo installed:
npm install -g yo
- Run:
yo webapp
- Install grunt-contrib-jade:
npm install grunt-contrib-jade --save-dev
This file contains 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
color desert | |
filetype plugin on | |
syntax on | |
let mapleader = "," | |
let g:mapleader = "," | |
let g:slime_target = "tmux" | |
let python_highlight_all = 1 | |
map <F12> :let &background = ( &background == "dark"? "light" : "dark" )<CR> |
This file contains 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 countCSSRules() { | |
var results = '', | |
log = ''; | |
if (!document.styleSheets) { | |
return; | |
} | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
countSheet(document.styleSheets[i]); | |
} | |
function countSheet(sheet) { |
NewerOlder