Skip to content

Instantly share code, notes, and snippets.

View 3manuek's full-sized avatar
🤖
tr3s.ma

Emanuel Calvo 3manuek

🤖
tr3s.ma
View GitHub Profile
@3manuek
3manuek / git-slim.py
Created March 7, 2016 01:29 — forked from afternoon/git-slim.py
Remove large objects from a git repository
#!/usr/bin/python
#
# git-slim
#
# Remove big files from git repo history.
#
# Requires GitPython (https://github.com/gitpython-developers/GitPython)
#
# References:
# - http://help.github.com/remove-sensitive-data/
@3manuek
3manuek / proxy.go
Created February 21, 2016 22:56 — forked from kylemcc/proxy.go
Basic Go TCP proxy...borrowed from someone...
package main
import (
"net"
"fmt"
"io"
"os"
"crypto/sha1"
"time"
)
@3manuek
3manuek / proxy.go
Created February 21, 2016 22:56 — forked from killwing/proxy.go
simple proxy
package main
import (
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"sync"
"time"
@3manuek
3manuek / gist:f4884fc30cfa006254cf
Created February 9, 2016 05:34
Install Docker ElasticSearch image in Azure
#!/bin/bash
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list
sudo echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | sudo tee /etc/apt/sources.list.d/newrelic.list
wget -O- https://download.newrelic.com/548C16BF.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get purge lxc-docker
sudo apt-cache policy docker-engine
@3manuek
3manuek / .gitignore
Created December 22, 2015 02:20 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@3manuek
3manuek / gist:de0b5997d39814ef7532
Last active November 17, 2015 21:21
MySQL sandbox tutorial
emanuel@3laptop ~/Downloads $ make_replication_sandbox --master_master mysql-5.7.9-linux-glibc2.5-x86_64.tar.gz
installing node 1
installing node 2
# server: 1:
# server: 2:
# server: 1:
# server: 2:
# server: 1:
# server: 2:
Circular replication activated
@3manuek
3manuek / gist:32e4fc62c6ebad998b8f
Last active November 17, 2015 04:26
Installing PLR
70 wget https://ftp.postgresql.org/pub/source/v9.4.5/postgresql-9.4.5.tar.gz
71 tar xzf postgresql-9.4.5.tar.gz
73 cd postgresql-9.4.5/
75 ./configure --help
76 apt-cache search libzip
77 apt-get install libzip-dev libzip2
79 apt-cache search libxmls
80 apt-get install libxmlsec1-dev
./configure --enable-profiling --enable-cassert --enable-depend CFLAGS="-fno-omit-frame-pointer" --enable-R-shlib --prefix=/opt/postgres_plr
84 make && make install
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@3manuek
3manuek / gist:148dfb59a2043176439b
Created August 19, 2014 19:21
issue on initdb
sekondquad@axle:~/minmax15$ bin/initdb -D /data/sekondquad/AXLE/sekondquad/minmax15/
The files belonging to this database system will be owned by user "sekondquad".
This user must also own the server process.
initdb: invalid locale settings; check LANG and LC_* environment variables
sekondquad@axle:~/minmax15$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
insert OID = 3564 ( pg_event_trigger_get_creation_commands 11 10 12 10 100 0 0 f f f f t t s 0 0 2249 "" "{26,26,23,25,25,25,25,16,114}" "{o,o,o,o,o,o,o,o,o}" "{classid,objid,objsubid,command_tag,object_type,schema,identity,in_extension,command}" _null_ pg_event_trigger_get_creation_commands _null_ _null_ _null_ )