Skip to content

Instantly share code, notes, and snippets.

View andrewsmedina's full-sized avatar

Andrews Medina andrewsmedina

View GitHub Profile
@andrestc
andrestc / go-missing-examples.md
Last active September 26, 2021 18:49
Go std lib funcs/methods missing examples

About this

This list has the goal of helping developers interested in contributing to the Go language but are unsure of where to start. This was not generated manually so some functions and methods here may not require examples (maybe because they are too simple, e.g .String()) and some of these may only make sense in a package level example (which are not considered for this list yet). Use your best judgment and check the documentation before you open up a CL to add an example.

You should also search in gerrit for open CLs that are already adding examples.

I will try to keep this list as up to date as possible. If you find any mistakes, please comment below and I will try to fix it.

#!/usr/bin/env python
import argparse
import json
import os
import urllib2
def get_envs(app_name):
resp = request("/apps/{}/env".format(app_name))
@jblancett
jblancett / rebuild_routes.py
Created December 29, 2014 19:03
rebuild tsuru routes
#!/usr/bin/env python
import pymongo, redis, os
REDIS_HOST = os.getenv('REDIS_HOST', 'localhost')
REDIS_PORT = os.getenv('REDIS_PORT', 6379)
MONGO_HOST = os.getenv('MONGODB_HOST', 'localhost')
MONGO_PORT = os.getenv('MONGODB_PORT', 27017)
mongo = pymongo.MongoClient(MONGO_HOST, MONGO_PORT)
Dev-Front-End TecSinapse
Migrado para o site:
http://tecsinapse.com.br/nossas-vagas
@renatooliveira
renatooliveira / fabfile.py
Last active September 1, 2017 14:02
Minha configuração atual de deploy, usada no projeto http://mobdoctor.me Otimizações são bem vindas :)
# coding: utf-8
from fabric.api import env, cd, run, sudo
from fabric.contrib.files import exists
from fabric.colors import green
from config import (HOST, USER, PASSWORD, APP_DIR,
ENV_HOME, PROJECT_NAME, VIRTUALENVS, REPOSITORY, BRANCH)
env.hosts = [HOST]
env.user = USER
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
require File.expand_path('../boot', __FILE__)
# require 'rails/all'
require "action_controller/railtie"
require "action_mailer/railtie"
require "rails/test_unit/railtie"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)
#!/bin/bash -u
docker="docker -H 127.0.0.1:4243"
if [ $# -lt 2 ]
then
echo >&2 "ERROR: wrong number of parameters."
echo >&2
echo >&2 "Usage:"
echo >&2 " $0 <image> <path_on_container::url> [path_on_conainer:url] ..."
#!/bin/bash
PREFIX=registry.cloud.tsuru.io/tsuru/
read command
for image in "$@"
do
echo "Generating $image... "
full_image=${PREFIX}${image}
id=`docker -H 127.0.0.1:4243 run -d $full_image $command`
@dcramer
dcramer / gist:5537828
Last active December 17, 2015 02:39
- 2 runs, one warmup, one timed
- warmup was 5m
- timed run 30s
- default sentry settings (no database access)
- 3 sync workers
- sentry start
- os-x (brew install pypy --devel)
- siege -c 3 http://localhost:9000/login/ -b -t30S
== pypy 2.0 beta 2