Skip to content

Instantly share code, notes, and snippets.

View ingoclaro's full-sized avatar

Ingo Claro ingoclaro

  • Groupon
  • Seattle, USA
View GitHub Profile
@ingoclaro
ingoclaro / questions.json
Created July 31, 2020 20:13
3pip payload examples
{
"purchaserQuestions": [{
"locale": "en_US",
"questions": [
{
"id": "firstName",
"property": "firstName",
"type": "TEXT",
"label": "First Name",
"value": "John",
@ingoclaro
ingoclaro / frontend-ingress.yaml
Created July 15, 2017 19:22
kubernetes-linkerd
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: frontend
annotations:
kubernetes.io/ingress.class: "linkerd"
spec:
backend:
serviceName: frontend
servicePort: http
@ingoclaro
ingoclaro / dkron setup
Created April 20, 2017 22:30
dkron inside docker
export HOST=xxxxx
# run this on every node
sudo docker run -p 8946:8946 -p 8946:8946/udp -p 6868:6868 \
--label "traefik.port=8080" \
--label "traefik.frontend.rule=PathPrefixStrip: /dkron" \
-v /usr/local/bin/docker:/usr/local/bin/docker \
-v /var/run/docker.sock:/var/run/docker.sock \
dkron/dkron \
@ingoclaro
ingoclaro / client.py
Last active August 1, 2016 23:04
twitter client
# run
# pip install requests
# to install dependency
# If you need some help debugging your regexes,
# check your regex here: https://regex101.com/
# Documentation for regex's are here: https://docs.python.org/2/library/re.html
# Hint: you can use re.findall(p, text) to get all matches
# Disable system integrity protection
# http://osxdaily.com/2015/10/05/disable-rootless-system-integrity-protection-mac-os-x/
csrutil disable
reboot
brew install homebrew/versions/openssl098
brew link openssl098 --force
cd ~/.rubies
ruby-build ree-1.8.7-2011.12 ree-1.8.7-2011.12
brew unlink openssl098
@ingoclaro
ingoclaro / bundle_config
Last active December 15, 2015 22:29
ruby install on OSX with ruby-build and chruby
#$HOME/.bundle/config
---
BUNDLE_BIN: bin
BUNDLE_PATH: .bundle
@ingoclaro
ingoclaro / gist:5278753
Last active December 15, 2015 14:59 — forked from zenkay/gist:3237860
ruby installation on OSX

Ruby, RVM and Mountain Lion

Key problems

Mountain Lion (10.8) has three main difference compared to Lion (10.7):

  • XCode 4.4 does not install Command Line Tools by default
  • X11 isn't available anymore
  • The installed version of OpenSSL has some bugs

How to work around

@ingoclaro
ingoclaro / application.rb
Last active December 15, 2015 08:39
nginx and passenger configuration for multiple apps on the same vhost
config.action_controller.page_cache_directory = "#{Rails.root}/public/cache"
upstream app {
server unix:/var/www/app.com/shared/sockets/unicorn.sock fail_timeout=0;
}
server {
server_name www.app.com;
rewrite ^ $scheme://app.com$request_uri? permanent;
}
server {
server_name app.com;