Skip to content

Instantly share code, notes, and snippets.

Avatar

Sergio Vilar sergiopvilar

View GitHub Profile
View stravaData.gs
/**
* Instruções em ingles para rodar este script: https://elifk.us/en/retrieving-your-strava-data-with-google-app-scripts/
*/
var CLIENT_ID = ''; // Client ID do Strava
var CLIENT_SECRET = ''; // Client Secret do Strava
var SPREADSHEET_NAME = "Registro de Exercícios"; // Nome da Planilha
var SPREADSHEET_ID = ""; // ID da Planilha
var SHEET_NAME = "Dados"; // Nome da página de dados
var DEBUG = false;
@sergiopvilar
sergiopvilar / aliases.sh
Last active Jul 15, 2020
Aliases to stop docker containers and remove all images. Need to wipe all docker stuff? Run docker_purge
View aliases.sh
alias docker_cleanup_images="docker images | awk '{print $3}' | xargs docker rmi"
docker_cleanup() {
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
}
docker_purge() {
docker_cleanup
docker_cleanup_images
View keybase.md

Keybase proof

I hereby claim:

  • I am sergiopvilar on github.
  • I am svilar (https://keybase.io/svilar) on keybase.
  • I have a public key ASCQQ_XGqnv3iKNFhklDIXeNnRbaq00zTszSU9XFl2wtGAo

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am sergiovilar on github.
  • I am svilar (https://keybase.io/svilar) on keybase.
  • I have a public key ASCQQ_XGqnv3iKNFhklDIXeNnRbaq00zTszSU9XFl2wtGAo

To claim this, I am signing this object:

@sergiopvilar
sergiopvilar / init.js
Created Oct 2, 2017
Translate DVORAK hotkeys to QWERTY in Atom
View init.js
atom.keymaps.addKeystrokeResolver(({keystroke, event}) => {
var qKeys = "q w e r t y u i o p [ ] a s d f g h j k l ; ' z x c v b n m , . /".split(' ')
, dvorakKeys = "' , . p y f g c r l / = a o e u i d h t n s - ; q j k x b m w v z".split(' ')
, key = keystroke
, replaced = [];
if(event.type == 'keydown' && event.metaKey && event.key !== 'Meta' && keystroke.startsWith('cmd-')) {
for(var i in dvorakKeys) {
View cookie-clicker-cheat.js
@sergiopvilar
sergiopvilar / pkg.js
Created Sep 15, 2015
Package Electron applications
View pkg.js
#!/usr/bin/env node
var os = require('os');
var pkgjson = require('./package.json');
var path = require('path');
var sh = require('shelljs');
var appVersion = pkgjson.version
, electronPackager = 'electron-packager'
, electronVersion = '0.29.2'
View output
]2;npm i levelup leveldown --verbose]1;npmnpm info it worked if it ends with ok
npm verb cli [ 'node',
npm verb cli '/usr/local/bin/npm',
npm verb cli 'i',
npm verb cli 'levelup',
npm verb cli 'leveldown',
npm verb cli '--verbose' ]
npm info using npm@2.7.5
npm info using node@v0.12.2
npm verb node symlink /usr/local/bin/node
View gist:fa12011fc5d9f4ce8334
cd ~/
git clone git@github.com:sergiovilar/subtitle-finder.git
cd ~/subtitle-finder
mv config.sample.json config.json