:shipit:
=>
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
$ gem list | |
*** LOCAL GEMS *** | |
activerecord-deprecated_finders (1.0.3) | |
activesupport (4.0.2) | |
arel (4.0.1) | |
atomic (1.1.14) | |
awesome_print (1.2.0) | |
bcrypt-ruby (3.1.2) |
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
#include <vector> | |
#include <iostream> | |
using namespace std; | |
vector<int> factorize(int num){ | |
int smallest_pairing = num; | |
vector<int> factors; | |
for(int i=1; i<smallest_pairing; i++) | |
{ |
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 'json' | |
first = JSON.parse File.read 'first.json' | |
second = JSON.parse File.read 'second.json' | |
third = JSON.parse File.read 'third.json' | |
categories = [] | |
first['filterElementCommands'].each_with_index do |top_level_category_info, index| | |
top_category = { info: top_level_category_info } |
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
states = ['start'] | |
transitions = [] | |
final_states = [] | |
simple_symbols = '()[]{}!=<>+-*/%;&,'.split('') | |
special_symbols = [">=", "<=", "==", "!="] | |
alpha = ('A'.ord .. 'Z'.ord).map(&:chr) + ('a'.ord .. 'z'.ord).map(&:chr) | |
numeric = (1..9).map(&:to_s) | |
alphabet = alpha + numeric + simple_symbols + ['0'] | |
stupid_symbols = ['!'] |
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
private HashMap<String, String> parseObject(String jsonObject) { | |
HashMap<String, String> ret = new HashMap<String, String>(); | |
int arrayDepth = 0, objDepth = 0; | |
boolean inQuotes = false; | |
String currentKey = ""; | |
String currentElement = ""; | |
for (int i = 0; i < jsonObject.length(); i++) { | |
char ci = jsonObject.charAt(i); |
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
# Clear existing task so we can replace it rather than "add" to it. | |
Rake::Task["deploy:compile_assets"].clear | |
namespace :deploy do | |
desc 'Compile assets' | |
task :compile_assets => [:set_rails_env] do | |
# invoke 'deploy:assets:precompile' | |
invoke 'deploy:assets:precompile_local' | |
invoke 'deploy:assets:backup_manifest' |
Check out Google Apps Script. Click "Start scripting", and it should bring you to a google-docs-esque text editor.
The gist of it is: You implement either a function doGet(e)
or a function doPost(e)
.
This function will be run when an HTTP request hits the google script's URL.
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/env node | |
const process = require("process"); | |
const fetch = require("node-fetch"); | |
if (process.argv.length < 3 || process.argv.length > 4) { | |
console.error(`Usage: ${process.argv[0]} endpoint timeout`); | |
process.exit(2); | |
} | |
const endpoint = process.argv[2]; |
OlderNewer