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
REGEX='^ [^ :]\{1,\}' | |
PROXY='' | |
grep -o -i $REGEX docker-compose.yml \ | |
| xargs \ | |
docker-compose build \ | |
--build-arg http_proxy=$PROXY \ | |
--build-arg NPM_ARGS='--proxy http://$PROXY --https-proxy http://$PROXY --strict-ssl false' \ | |
$@ |
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
import * as express from 'express'; | |
import * as request from 'request-promise'; | |
import * as graphqlHTTP from 'express-graphql'; | |
import { makeExecutableSchema } from 'graphql-tools'; | |
const typeDefs = ` | |
type V2 { | |
origin: String | |
title: String | |
} |
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
import { exec } from 'child_process'; | |
exec(`{ echo "GET hello"; sleep 0.05; } | telnet 127.0.0.1 6379`, (error, stdout, stderr) => { | |
// assert | |
}); |
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 Redis = require('ioredis'); | |
const zlib = require('zlib'); | |
Redis.Command.setArgumentTransformer('set', (args) => { | |
const value = args[1]; | |
switch (typeof value){ | |
case 'string': | |
args[1] = zlib.gzipSync(value).toString('base64'); |
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 "minitest/autorun" | |
class Proxy | |
module DSL | |
module ClassMethods | |
def option(name) | |
define_method(name) do |value| | |
tap do | |
options[name] = value | |
end |
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
bind j select-pane -D | |
bind k select-pane -U | |
bind h select-pane -L | |
bind l select-pane -R | |
bind | split-window -h | |
bind - split-window -v | |
bind -r J resize-pane -D 5 | |
bind -r K resize-pane -U 5 |
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 'net/http' | |
require 'uri' | |
require 'json' | |
module NewRelic | |
module Insights | |
class Query | |
attr_reader :key, :account_id | |
def initialize(key, account_id) |
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
1. go to http://dl.hhvm.com/ubuntu/pool/main/h/hhvm/ and right click and copy the link to the version of hhvm you want to rollback to | |
2. sudo apt-get autoremove hhvm -y | |
3. wget <link you just copied> | |
4. sudo dpkg -i <name of file u just downloaded> | |
5. apt-get install -f | |
6. service hhvm start | |
Edit: Don't worry when it errors out on step 4. that is expected. just continue to step 5. |
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
### Keybase proof | |
I hereby claim: | |
* I am jamesmoriarty on github. | |
* I am jamesmoriarty (https://keybase.io/jamesmoriarty) on keybase. | |
* I have a public key whose fingerprint is 06A1 9318 4CA2 F3A0 BDA4 1B17 0062 ED6D CBAF BEEF | |
To claim this, I am signing this object: |
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
#!/usr/bin/env ruby | |
# | |
# Syncs Ruby binstubs for ruby-communal-gems. | |
# Run this everytime you install a new Ruby, or when you install a new gem | |
# with a bin/ command. (ie, when you typically do rbenv rehash) | |
# | |
# See: https://github.com/tpope/rbenv-communal-gems/issues/5 | |
# | |
require 'fileutils' |