Skip to content

Instantly share code, notes, and snippets.

View gugat's full-sized avatar

Gustavo Salazar gugat

  • Buk
  • Santiago - Chile
View GitHub Profile
@gugat
gugat / conteo_votos.R
Created February 11, 2021 14:35 — forked from loreabad6/conteo_votos.R
Diferencia entre @yakuperezg y @LassoGuillermo, tweets de @angiegomeza de los resultados del CNE.
library(rtweet)
library(tidyverse)
library(lubridate)
library(gganimate)
# Extraer tweets de Andrea Gomez
reconteo = search_tweets(
q = "angiegomeza AND Actualización AND Diferencia",
include_rts = F
)
@gugat
gugat / give_me_paremeter.sh
Created September 25, 2019 13:36
How to exit if no arguments are given to the script
#!/bin/bash
if [[ $# -eq 0 ]] ; then
echo 'Give me a parameter :D'
exit 0
fi
@gugat
gugat / postman_parse_link_headers.rb
Last active September 3, 2019 20:25 — forked from thesowah/plh.rb
Parse link headers from Postman API in Ruby
export const signIn = (email, password) => {
return (dispatch, getState) => {
return new Promise((resolve, reject) => {
return fetch(`${BASE_URL}/auth/sign_in`, {
method: 'POST',
timeout: REQUEST_TIMEOUT,
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
require 'minitest/autorun'
require 'minitest/spec'
#:nodoc:
class TestCompensation < Minitest::Test
def setup
@compensation = Compensation.new
end
describe 'when worked less than 12 months' do
@gugat
gugat / documents.rb
Created November 8, 2018 17:14 — forked from dhh/documents.rb
# config/routes.rb
resources :documents do
scope module: 'documents' do
resources :versions do
post :restore, on: :member
end
resource :lock
end
end
@gugat
gugat / gist:0bed825976c2049ebe15214f9690a126
Created March 8, 2018 17:08 — forked from chrissimpkins/gist:5bf5686bae86b8129bee
Atom Editor Cheat Sheet (Sweetmeat)

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key

Convert .mov to .gif

Useful when you want to share in Github how a change in your code is working, or how to reproduce a bug. I use QuickTimePlayer to record the screen, then ffmpeg to convert the mov file to gif.

ffmpeg -i video.mov -r "15" video.gif

This example sets the frame rate to 15.

ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@gugat
gugat / GitCommitEmoji.md
Created December 28, 2017 17:57 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji