Skip to content

Instantly share code, notes, and snippets.

@aliou
aliou / postmortem.md
Created May 5, 2020 14:32 — forked from mlafeldt/postmortem.md
Example Postmortem from SRE book, pp. 487-491

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym
@aliou
aliou / phoenix_to_umbrella
Created December 29, 2017 15:09 — forked from emilsoman/phoenix_to_umbrella
How to move an existing phoenix app under an umbrella app
How to convert existing phoenix app to an umbrella app.
https://elixir-lang.slack.com/archives/phoenix/p1472921051000134
chrismccord [10:14 PM]
@alanpeabody yes, it's straightforward
[10:14]
1) mix new my_umbrella --umbrella
@aliou
aliou / .profile
Created September 22, 2016 14:00 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@aliou
aliou / gist:d6c5c04313255269165a
Created November 19, 2015 18:26 — forked from technoweenie/gist:1072829
.netrc file so you can push/pull to https git repos without entering your creds all the time
machine github.com
login technoweenie
password SECRET
machine api.github.com
login technoweenie
password SECRET
@aliou
aliou / index.md
Last active September 8, 2015 12:46 — forked from rstacruz/index.md
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

@aliou
aliou / mandrillapp_invalid_sender_characters.rb
Last active September 2, 2015 08:35 — forked from hmnhf/mandrillapp_invalid_sender_characters.rb
Mandrillapp invalid sender characters
# I was encountering this exception
# Net::SMTPServerBusy: 401 4.1.7 Bad sender address syntax
# First I searched to see if there's any documentation around this issue,
# didn't find anything, so I wrote this snippet to find those invalid characters
require 'mail'
Mail.defaults do
delivery_method :smtp, {
:port => 25,
@aliou
aliou / README.md
Last active December 10, 2015 14:59 — forked from mbostock/.block
Calendar view.

This example demonstrates loading of CSV data, which is then quantized into a diverging color scale. The values are visualized as colored cells per day. Days are arranged into columns by week, then grouped by month and years. Colors by Cynthia Brewer. Layout inspired by Rick Wicklin and Robert Allison. Dow Jones historical data copyright Yahoo! Finance or independent data provider; fair use for educational purposes.

@aliou
aliou / readme.md
Last active December 10, 2015 00:59 — forked from NorthIsUp/fuel.py

Nike fuel data

The config file is located at ~/.config/nike/config is formated like a regular yaml file:

access_token: xxxxxxx
deviceId: xxxxxxx
@aliou
aliou / keylogger.c
Created December 12, 2012 14:06 — forked from frasten/keylogger.c
/* Compilare con:
* gcc keys.c -lX11 -o keylogger
*/
#include <X11/Xlib.h>
#include <unistd.h>
#include <stdio.h>
#include <signal.h>
#include <X11/keysym.h>
@aliou
aliou / index.html
Created November 30, 2012 06:27 — forked from tmcw/index.html
A Song Chain
<!DOCTYPE html>
<html>
<head>
<title>Songs</title>
<style>
line.link {
stroke:#eee;
}
text {
fill:#888;