Skip to content

Instantly share code, notes, and snippets.

@Telmo
Telmo / supervisord-example.conf
Last active August 29, 2015 14:25 — forked from didip/supervisord-example.conf
Example for supervisord conf file
; Sample supervisor config file.
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; sockef file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; (default is no username (open server))
;password=123 ; (default is no password (open server))
;[inet_http_server] ; inet (TCP) server disabled by default
@Telmo
Telmo / supervisord-example.conf
Last active August 29, 2015 14:25 — forked from didip/supervisord-example.conf
Example configuration file for supervisord.conf
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon
worker_processes auto;
events {
worker_connections 100000;
multi_accept on;
use epoll;
}
worker_rlimit_nofile 100000;
# echo 20000 > /writable-proc/sys/net/core/somaxconn
@Telmo
Telmo / kanal.go
Created February 4, 2016 12:22 — forked from callerobertsson/kanal.go
Golang: Playing with a queue channel
package main
import (
"bufio"
"fmt"
"math/rand"
"os"
"strconv"
"time"
)
@Telmo
Telmo / golang-tls.md
Created May 6, 2016 12:29 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples

Generated private key

openssl genrsa -out server.key 2048

To generate a certificate

openssl req -new -x509 -key server.key -out server.pem -days 3650

https

@Telmo
Telmo / database.sh
Created June 15, 2016 11:55
sqlx scannable dest type struct with >1 columns (16) in result
mysql> select * from builds where id='1';
*************************** 1. row ***************************
id: 1
name: test1
description: This is the redhat-6-4 test
custom_packages: http://test.net/builds/redhat/6/4/extra_packages
ssh_key: http://test.net/builds/id_rsa.pub
yum_repos: http://test.net/builds/redhat/6/extra_repos
postinstall: qq
os: redhat
@Telmo
Telmo / .tmux.conf
Created July 13, 2017 09:16
tmux config
# The tmux config of Evan Pete Walsh >> epwalsh.com :: [email protected]
#
# Last Modified: 2016-07-10 13:49:20
# Key bindings -----------------------------------------------------------
# Resize pane with option + arrow keys
bind -n M-Left resize-pane -L 10
bind -n M-Right resize-pane -R 10
bind -n M-Down resize-pane -D 10
bind -n M-Up resize-pane -U 10
@Telmo
Telmo / generate.bash
Created June 27, 2019 15:03 — forked from twolfson/generate.bash
Generate all the unicode/UTF8
#!/usr/bin/env bash
# Generate all non-control unicode characters up to the 3 byte range
# http://stackoverflow.com/questions/5517500/simple-shell-script-for-generating-hex-numbers-of-a-certain-range
# http://www.utf8-chartable.de/
hex_range () {
from="$1"
to="$2"
for i in $(seq "$(printf "%d" "0x$from")" "$(printf "%d" "0x$to")"); do
printf "%02X\n" "$i"
done

Keybase proof

I hereby claim:

  • I am telmo on github.
  • I am romode (https://keybase.io/romode) on keybase.
  • I have a public key ASD0jYIk52Bl5EO1eZLSy7iKhrk1E5B0RP7vkOJGgXqQggo

To claim this, I am signing this object:

@Telmo
Telmo / destiny2_api_intro.py
Created September 3, 2020 08:42 — forked from cortical-iv/destiny2_api_intro.py
Highly annotated introduction to the destiny2 api (Python)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Getting Started using the Destiny 2 Api
An annotated guide to some of the public endpoints available for examining a user's
characters, items, and clan using the Destiny 2 API. You will need to use your api key for
this to work. Just insert it as a string where it says <my_api_key> in the beginning.
It is broken into four parts:
0: Imports, variables, and fixed parameters defined