Skip to content

Instantly share code, notes, and snippets.

View guumaster's full-sized avatar
:octocat:
⌨️

Gustavo Marin guumaster

:octocat:
⌨️
View GitHub Profile
@sebosborn
sebosborn / the_witch_is_dead
Last active June 25, 2022 19:28
An unofficial transcription of THE WITCH IS DEAD from https://gshowitt.itch.io/the-witch-is-dead. Please support the original!
THE WITCH IS DEAD.
------------------
AN RPG ABOUT MURDER.
Once upon a time, there was a kind and
wise and beautiful witch who lived in the
forest with her familiars, and her life was
peaceful and happy until a FUCKING
WITCH-HUNTER broke into her cottage
and dragged her out and FUCKING
@RaviTezu
RaviTezu / installGO.sh
Last active May 13, 2022 16:25
Shell(bash) script to install golang on Linux and MacOS machines
#!/usr/bin/env bash
set -e
# Author: Ravi Teja Pothana (@RaviTezu)
# Date: Nov 15, 2016
# The MIT License (MIT)
# Copyright (c) 2016 RaviTezu
@christopherlovell
christopherlovell / display.py
Last active November 18, 2023 22:22
display youtube video in jupyter notebook
from IPython.display import HTML
# Youtube
HTML('<iframe width="560" height="315" src="https://www.youtube.com/embed/S_f2qV2_U00?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>')
# Vimeo
HTML('<iframe src="https://player.vimeo.com/video/26763844?title=0&byline=0&portrait=0" width="700" height="394" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe><p><a href="https://vimeo.com/26763844">BAXTER DURY - CLAIRE (Dir Cut)</a> from <a href="https://vimeo.com/dannysangra">Danny Sangra</a> on <a href="https://vimeo.com">Vimeo</a>.</p>')
@guumaster
guumaster / 00-README.md
Last active January 23, 2023 15:48
How to upload a file with $.ajax to AWS S3 with a pre-signed url

Upload a file with $.ajax to AWS S3 with a pre-signed url

When you read about how to create and consume a pre-signed url on this guide, everything is really easy. You get your Postman and it works like a charm in the first run.

Then you open your browser, try your usual $.ajax() and send your PUT operation, and you hit the cold iced wall of AWS error message, a simple <Code>SignatureDoesNotMatch</Code> that will steal hours from your productivity.

So here I come to save you and give you a free working example of how to upload a file directly to AWS S3 from your browser. You are wellcome :).

@watson
watson / README.md
Last active July 13, 2023 22:42
A list of search and replace unix commands to help make a node repository 'standard' compliant

The standard code style linter is a great tool by Feross - check it out!

Remove trailing semicolons:

find . -path ./node_modules -prune -o -type f -name '*.js' -exec sed -i '' -e 's/;$//' {} \;

Ensure space between function and opening bracket:

@guumaster
guumaster / .gitconfig
Created September 19, 2014 09:28
My global gitconfig
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
@hyg
hyg / gist:9c4afcd91fe24316cbf0
Created June 19, 2014 09:36
open browser in golang
func openbrowser(url string) {
var err error
switch runtime.GOOS {
case "linux":
err = exec.Command("xdg-open", url).Start()
case "windows":
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
case "darwin":
err = exec.Command("open", url).Start()
@jgdoncel
jgdoncel / pdftk.bat
Created October 22, 2013 08:55
PDFTK - Comandos útiles
REM Para unir dos documentos diferentes podemos ejecutar lo siguiente desde la consola:
pdftk archivo1.pdf archivo2.pdf cat output salida.pdf
REM Tambien podemos unirlos utilizando etiquetas:
pdftk A=archivo1.pdf B=archivo2.pdf cat A B output salida.pdf
REM Y por supuesto podemos usar comodines:
pdftk *.pdf cat output salida.pdf
REM Para separar páginas de varios documentos y crear un documento nuevo con estas hacemos lo siguiente:
@tetsuok
tetsuok / answer_pic.go
Created April 2, 2012 02:40
An answer of the exercise: Slices on a tour of Go
package main
import "code.google.com/p/go-tour/pic"
func Pic(dx, dy int) [][]uint8 {
// Allocate two-dimensioanl array.
a := make([][]uint8, dy)
for i := 0; i < dy; i++ {
a[i] = make([]uint8, dx)
}