Skip to content

Instantly share code, notes, and snippets.

View Kraloz's full-sized avatar
🏠
Working from home

Tomas Aprile Kraloz

🏠
Working from home
  • Buenos Aires, Argentina
View GitHub Profile
@johanmeiring
johanmeiring / gist:3002458
Created June 27, 2012 08:32
"git lg" alias for pretty git log
# From http://garmoncheg.blogspot.com/2012/06/pretty-git-log.html
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
@digitaljhelms
digitaljhelms / gist:4287848
Last active May 11, 2024 23:32
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@estliberitas
estliberitas / reset.js
Created January 3, 2013 23:27
Node.js script which makes Tor change identity (i.e. IP address)
/**
* Created with IntelliJ IDEA.
* User: Alexander <estliberitas> Makarenko
* Date: 04.01.13
* Time: 3:25
*/
'use strict';
var fs = require('fs')
, net = require('net')
@tuxmartin
tuxmartin / Test.py
Created June 10, 2015 21:54
Python ORM example (Python + SQLAlchemy + SQlite/MySQL)
from sqlalchemy.ext.declarative import declarative_base
#from sqlalchemy import *
#from sqlalchemy.orm import *
# Pro entity v podadresari. Podaresar *musi* obsahovat prazdny soubor __init__.py !
#from entity.User import User
'''
Zavislosti:
# apt-get install python-sqlalchemy
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 12, 2024 01:58
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@alper
alper / simple-git-branching-model.md
Last active December 8, 2023 10:43 — forked from jbenet/simple-git-branching-model.md
Normative git branching model based on rebasing and best practices

a simple git branching model

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@luishendrix92
luishendrix92 / cyclic.js
Last active January 31, 2020 19:44
Cyclic Iterator (with ES6 Generators) and .take()
/*
Say I need to iterate over [1, 2, 3], yielding a value
at a time but once I reach the final value, I want to
keep receiving the values over and over again, making
it a repeated sequence: 1, 2, 3, 1, 2, 3, 1 and so on...
*/
const cyclic = list => (function* () {
while (true) for (let item of list) yield item
}())
@fgilio
fgilio / axios-catch-error.js
Last active April 11, 2024 19:02
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@Villanuevand
Villanuevand / README-español.md
Last active May 3, 2024 10:38
Una plantilla para hacer un buen README.md. Inspirado en el gist de @PurpleBooth => https://gist.github.com/PurpleBooth/109311bb0361f32d87a2

Título del Proyecto

Acá va un párrafo que describa lo que es el proyecto

Comenzando 🚀

Estas instrucciones te permitirán obtener una copia del proyecto en funcionamiento en tu máquina local para propósitos de desarrollo y pruebas.

Mira Deployment para conocer como desplegar el proyecto.

@bansalayush
bansalayush / gist:fa6f28235438592d713ce600fe49c305
Created September 12, 2018 04:38
Install and debug react-native init app without USB!!!!!
1) Connect your mobile device via usb (just this once)
2) Establish a port with your mobile device using 'adb tcpip <port number>'.
eg. adb tcpip 5555
3) Remove USB and 'adb connect <mobile device ip><above mentioned port number>' .
Eg . adb connect 192.160.0.124:5555
4) 'React-native run-android' in your project folder