Skip to content

Instantly share code, notes, and snippets.

View Glavin001's full-sized avatar
💻
Working - I may be slow to respond.

Glavin Wiechert Glavin001

💻
Working - I may be slow to respond.
View GitHub Profile
@Glavin001
Glavin001 / gdoc_to_audio.sh
Created December 13, 2016 05:40
Convert Google Document to an "Audiobook" with Mac's built-in text-to-speech!
#/usr/bin/env bash
# Configure
DOC_NAME="DOC NAME"
DOC_ID="DOC ID"
TOKEN="MY_TOKEN"
READ_SPEED=170;
URL="https://docs.google.com/document/export?format=txt&id=${DOC_ID}&token=${TOKEN}, https://docs.google.com/document/d/${DOC_ID}/edit"
DOWNLOAD_DIR="audio_books"
@Glavin001
Glavin001 / debug.md
Created January 2, 2017 06:26
space_after_anon_function not working with js-beautify
@Glavin001
Glavin001 / debug.md
Created January 2, 2017 06:37
Vue with space_after_anon_function
@Glavin001
Glavin001 / debug.md
Last active January 3, 2017 04:57
Allow Atom Editor language options to be used
@Glavin001
Glavin001 / XGH - PT-BR.txt
Created January 6, 2017 18:44 — forked from banaslee/XGH - de-de.txt
eXtreme Go-Horse Process
Fonte: http://gohorseprocess.wordpress.com
1- Pensou, não é XGH.
XGH não pensa, faz a primeira coisa que vem à mente. Não existe
segunda opção, a única opção é a mais rápida.
2- Existem 3 formas de se resolver um problema, a correta, a errada e
a XGH, que é igual à errada, só que mais rápida.
@Glavin001
Glavin001 / lmutracker.mm
Created February 27, 2017 03:05 — forked from kenkeiter/lmutracker.mm
Read lux measurement using MBP ambient light sensor.
// lmutracker.mm -- Provides lux measurement using MacBook Ambient Light Sensor
//
// clang -o lmutracker lmutracker.mm -framework IOKit -framework CoreFoundation
//
// Adaptation of code originally posted at https://bugzilla.mozilla.org/show_bug.cgi?id=793728
// by Reuben Morais. Modified by Ken Keiter <[email protected]> to output a single *lux* value
// and exit, rather than repeating measurements on the sensor's arbitrary scale.
#include <mach/mach.h>
#include <math.h>
@Glavin001
Glavin001 / integration.async.await.js
Created May 13, 2017 17:35 — forked from jcready/integration.async.await.js
Node.js example of GitHub Integration auth process
// With async/await support
const fs = require('fs')
const jwt = require('jwt-simple')
const pem_file = '/path/to/github.pem' // the absolute path to your Application Pem Certificate issued by GitHub
const integration_id = 0 // GitHub Application Integration ID
const installation_id = 0 // once installed on an organization. The Organization Integration ID
const expire_seconds = 60 // number of seconds the jwt token expires (max ~600 but not designated by GitHub)
const slug = 'owner/repo' // name of repo for demo purposes
const privateKey = fs.readFileSync(pem_file)
@Glavin001
Glavin001 / web-servers.md
Created May 29, 2017 19:56 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000