Skip to content

Instantly share code, notes, and snippets.

@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@sloria
sloria / bobp-python.md
Last active May 1, 2024 08:37
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 30, 2024 23:36
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@willurd
willurd / web-servers.md
Last active April 28, 2024 21:38
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@annalee
annalee / sample-slack-coc.md
Last active April 11, 2024 21:14
A sample code of conduct for social slack teams.

[SLACKNAME] Code of Conduct

Welcome!

[BRIEF DESCRIPTION OF THE SLACK AND ITS PURPOSE]

The current admins are:

  • [NAMES]
@gimenete
gimenete / readme.md
Last active March 9, 2024 16:36
Notas para orientación profesional como programador

Tras este tweet que publiqué

He sido freelance, emprendedor y trabajo desde hace años para empresas USA de diversos tamaños en remoto como programador fullstack. Ahora en GitHub. Si puedo ayudar a alguien en orientar su carrera, mis DMs están abiertos. Ask me anything.

he recibido muchos mensajes y escribo aquí algunos de los consejos que he dado en resumen. Nota: algunas cosas son concretas de trabajar en España. Si vas a trabajar desde Sudamérica sólo una nota: tienes la ventaja de la zona horaria para trabajar con EEUU.

Inglés

Tener un buen nivel de inglés es fundamental para poder trabajar con clientes extranjeros. El conocimiento del idioma tiene que mantenerse en el tiempo. Es como mantenerse en forma física; si lo dejas, lo pierdes. Personalmente aunque trabajo 100% en inglés desde hace bastantes años, intento crearme un entorno diario con el idioma para no perderlo:

@carlosefonseca
carlosefonseca / sqlite2csv.sh
Created January 9, 2014 13:44
Exports all tables in a sqlite database to CSV.
#!/usr/bin/env bash
# obtains all data tables from database
TS=`sqlite3 $1 "SELECT tbl_name FROM sqlite_master WHERE type='table' and tbl_name not like 'sqlite_%';"`
# exports each table to csv
for T in $TS; do
sqlite3 $1 <<!
.headers on
@jfisbein
jfisbein / loteria.sh
Last active December 22, 2023 12:32
Script para chequear numeros loteria de navidad usando api de El Pais
#!/usr/bin/env bash
# Script to check Spanish Christmas Lottery
# more info: https://servicios.elpais.com/sorteos/loteria-navidad/api/
AUTO_RELOAD="120" # seconds
declare -A mainPrizes
mainPrizes['numero1']='1er Premio'
mainPrizes['numero2']='2º Premio'
@PaulMaddox
PaulMaddox / decrypt.sh
Created April 4, 2014 10:38
LUKS encrypted image file
#!/bin/bash
FILENAME="private.img";
FILESIZE="100M";
# Create encrypted volume if it doesn't exist
if [ ! -f $FILENAME ]; then
echo "Creating image file...";
dd if=/dev/zero of=$FILENAME bs=$FILESIZE count=0 seek=1