View proxy
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
# Script for automatic setup of SOCKS proxy through SSH connection. | |
# It automatically teardowns SOCKS configuration before stopping. | |
# It's supposed to work on Mac OS X 10.6+ | |
# | |
# Author: Adam Stankiewicz (@sheerun) | |
# | |
[[ -n "$1" ]] || { echo "Usage: proxy user@example.com"; exit 1; } | |
# get service GUID and NAME (like Wi-Fi) to set SOCKS proxy |
View certgen.rb
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
# Generates necessary certificates to ~/.docker | |
# | |
# Usage: | |
# bundle install | |
# ruby certgen.rb <domain> | |
require 'certificate_authority' | |
require 'fileutils' | |
if ARGV.empty? |
View class1.js
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
/* @flow */ | |
export class GraphQLSchema { | |
getQueryType() { | |
return "foobar"; | |
} | |
} |
View docker-compose.yml
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
version: '2' | |
services: | |
web: | |
image: node:4-slim | |
volumes: | |
- .:/app | |
command: node /app/index.js | |
ports: | |
- "9500:9500" |
View fast-async.js
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
'use strict'; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | |
Function.prototype.$asyncbind = function $asyncbind(self, catcher) { | |
'use strict'; | |
if (!Function.prototype.$asyncbind) { | |
Object.defineProperty(Function.prototype, '$asyncbind', { | |
value: $asyncbind, |
View schema.json
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
{ | |
"api": { | |
"id": "string", | |
"name": "string", | |
"sort_order": 0, | |
"backend_protocol": "http", | |
"frontend_host": "string", | |
"backend_host": "string", | |
"servers": [ | |
{ |
View deploy.sh
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
#!/bin/bash | |
export NAME=ghost | |
export TARGET=root@1.2.3.4 | |
export SERVICE=$(mktemp) | |
cat > $SERVICE <<EOF | |
[Unit] | |
Description=Ghost | |
After=docker.service |
View .bowerrc
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
{ | |
"registry": "https://registry.bower.io" | |
} |
View dwa.cpp
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
#include <bits/stdc++.h> | |
using namespace std; | |
bool prime(long n) { | |
if (n < 2) return false; | |
for (long i = 2; i*i <= n; i++) { | |
if (n % i == 0) return false; | |
} |
View start.sh
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
#!/bin/sh | |
printf "Hello world" |
OlderNewer