Skip to content

Instantly share code, notes, and snippets.

View ecelis's full-sized avatar
🏹
📷 🥊

Ernesto Celis ecelis

🏹
📷 🥊
View GitHub Profile
@alanbriolat
alanbriolat / default.conf
Created September 28, 2011 14:01
nginx userdir + PHP-FPM
server {
listen 80;
server_name localhost;
# ... other default site stuff, document root, etc. ...
location ~ ^/~(?<userdir_user>.+?)(?<userdir_uri>/.*)?$ {
alias /home/$userdir_user/public_html$userdir_uri;
index index.html index.htm index.php;
autoindex on;
@scvalex
scvalex / pull_contacts.py
Created July 15, 2010 23:25
Pull data from Google Contacts
#!/usr/bin/python
"""Module for pulling contacts out of Google and storing them to disk
(or something).
See the official guide for a more in-depth look at GData Python
http://code.google.com/apis/contacts/docs/1.0/developers_guide_python.html
"""
import atom
@dvgodoy
dvgodoy / draw_neural_net.py
Last active December 16, 2022 06:44
Draw neural network diagram with Matplotlib
## Gist originally developed by @craffel and improved by @ljhuang2017
import matplotlib.pyplot as plt
import numpy as np
def draw_neural_net(ax, left, right, bottom, top, layer_sizes, coefs_, intercepts_, n_iter_, loss_):
'''
Draw a neural network cartoon using matplotilb.
:usage:
@patik
patik / how-to-squash-commits-in-git.md
Last active October 17, 2023 02:19
How to squash commits in git

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

@max-mapper
max-mapper / helloworld.js
Created November 27, 2012 06:55
droneduino
var serialport = require('node-serialport')
var sp = new serialport.SerialPort("/dev/ttyO3", {
parser: serialport.parsers.raw,
baud: 9600
})
sp.on('data', function(chunk) {
console.log(chunk.toString('hex'), chunk.toString(), chunk)
})
@tobiasvl
tobiasvl / install_aseprite.sh
Last active January 19, 2024 00:35
The commands to build aseprite on Fedora
# Copied from https://github.com/aseprite/aseprite/blob/master/INSTALL.md#skia-on-linux
sudo yum install -y gcc-c++ cmake ninja-build libX11-devel libXcursor-devel mesa-libGL-devel fontconfig-devel
mkdir $HOME/deps
cd $HOME/deps
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
git clone -b aseprite-m71 https://github.com/aseprite/skia.git
export PATH="${PWD}/depot_tools:${PATH}"
cd skia
@nicwolff
nicwolff / XML_breaker.py
Last active March 14, 2024 02:11
Python script to break large XML files
import os
import sys
from xml.sax import parse
from xml.sax.saxutils import XMLGenerator
class CycleFile(object):
def __init__(self, filename):
self.basename, self.ext = os.path.splitext(filename)
self.index = 0
@miguelmota
miguelmota / README.md
Last active March 16, 2024 12:52
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@pascalpoitras
pascalpoitras / config.md
Last active April 8, 2024 18:58
My WeeChat configuration

WeeChat Screenshot

Mouse


enable