Skip to content

Instantly share code, notes, and snippets.

View andypotanin's full-sized avatar
🇺🇲
Focusing

Andy Potanin andypotanin

🇺🇲
Focusing
View GitHub Profile
[
{auth_backends,[rabbit_auth_backend_internal]},
{auth_mechanisms,['PLAIN','AMQPLAIN']},
{backing_queue_module,rabbit_variable_queue},
{cluster_nodes,[]},
{collect_statistics,fine},
{collect_statistics_interval,5000},
{default_permissions,[<<".*">>,<<".*">>,<<".*">>]},
{default_user,<<"guest">>},
{default_user_tags,[administrator]},
var express = require('express');
var proxy = require('http-proxy').createProxyServer;
var request = require( 'request' );
var app = express();
var mount = express();
mount.configure( function() {
// proxy using good ol' request module
app.use( function( req, res ) {
worker_processes 1;
daemon off;
events {
worker_connections 1024;
}
# curl localhost:8000/api/ariya.github.io/js/random/index.html
# curl localhost:8000/api/stackoverflow.com
http {
worker_processes 1;
daemon off;
events {
worker_connections 1024;
}
# curl -x localhost:8000 http://ariya.github.io/js/random/index.html
http {
server {
objectives:
- ""
features:
- ""
methods:
- "module.create()"
- "module.prototype.destroy()"
Objectives:
- ""
Features:
- ""
Methods:
- "module.create()"
- "module.prototype.destroy()"
@andypotanin
andypotanin / badges-_summary.md
Last active November 21, 2017 06:25
Repository Badges

Please see repository-type specific Gists for examples.

  • All repositories should have Bug, Backlog and Active (In Progress) labels via Waffle.io to hep quickly grasp state of repository.
  • Code Quality and Climate badge should be done via either Scrutinizer (PHP) or CodeClimate (JavaScript), depending on which works better.
  • Gemnasium should be used to determine status of dependencies - it works with Composer, NPM and others.
  • CircleCI should be used in most cases, keep in mind an API token is required for each repository and must be generated in CircleCI settings. This should demonstrate if the code in the repository actually works.
  • For certain repositories custom badges (NPM, Packagist, etc.) may be used as well, when applicable.
@andypotanin
andypotanin / centos-docker-setup.sh
Last active August 29, 2015 14:03
centos-docker-setup.sh
rpm -ivh http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install -y docker-io
chkconfig docker on
yum -y install git
yum -y install screen
yum -y groupinstall "Development Tools"
yum -y install gcc
yum -y install gcc-c++
@andypotanin
andypotanin / go-deeper.sh
Last active August 29, 2015 14:03
go deeper
##
# @see https://github.com/jpetazzo/dind/blob/master/Dockerfile#L18
#
# docker pull ubuntu:14.04
# docker run -it ubuntu:14.04 /bin/bash
#
##
apt-get update -qq
apt-get install -qqy iptables ca-certificates lxc
# docker run --rm centos /bin/sh
# Will start you into shell, and continue running after you exit.
docker run --name=App1 -t centos /bin/sh
# Won't do anything because no terminal tag.
docker run --name=App2 centos /bin/sh
# Will start and persist w/o loading you into shell.
docker run --name=App3 -td centos /bin/sh