Skip to content

Instantly share code, notes, and snippets.

View idkjs's full-sized avatar

Alain Armand idkjs

View GitHub Profile
@idkjs
idkjs / .wakeup
Created September 13, 2017 08:12 — forked from ralph089/.wakeup
Restarts Bluetooth Module on Mac OS X El Capitan. You can use the script as shortcut to restart Bluetooth on demand or you can use it with "SleepWatcher" to automatically restart Bluetooth on wakeup (See README.md). I created it, because my Logitech Bluetooth Mouse doesn't stay connected after sleep-mode, so i had to manually re-pair my mouse.
#!/bin/bash
#
# Restart Bluetooth Module on Mac OS X
#
# Requires Blueutil to be installed: http://brewformulas.org/blueutil
BT="/usr/local/bin/blueutil"
log() {
echo "$@"
@idkjs
idkjs / google-apps-script.md
Created September 15, 2017 00:54 — forked from labnol/google-apps-script.md
The best resources for learning Google Apps Script, the glue that connects various Google services including Gmail, Google Drive, Calendar, Maps, Analytics and more.
@idkjs
idkjs / How to download streaming video
Created September 17, 2017 11:54 — forked from danfinlay/How to download streaming video.md
How to download a streaming video with Google Chrome
#How to download streaming video
Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.
##Open Developer Tools
From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:
1. (On a mac): Command-option-J
2. (On a PC): Control-alt-J
/*
* Mass Emailer Google Spreadsheet script.
*
* Changelog:
*
* 27. Apr. 2013
* - trial checkbox allows easier debugging
* 16. Feb. 2012
* - released the first version to public
* 15. Feb. 2012
@idkjs
idkjs / tmux-iterm2.md
Created September 20, 2017 14:39 — forked from royling/tmux-iterm2.md
tmux in iTerm2 cheatsheet
@idkjs
idkjs / SignupForm.re
Created September 25, 2017 18:00 — forked from Zerim/SignupForm.re
A simple SignupForm written in ReasonML
type action =
| UpdateEmail string
| UpdatePassword string;
type state = {
email: string,
password: string
};
let component = ReasonReact.reducerComponent "Signup";
@idkjs
idkjs / docker_kill.sh
Created September 29, 2017 20:48 — forked from evanscottgray/docker_kill.sh
kill all docker containers at once...
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt
@idkjs
idkjs / index.html
Created October 7, 2017 08:10 — forked from iamsaso/index.html
GraphiQL with JWT
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 100%;
margin: 0;
width: 100%;
overflow: hidden;
}
@idkjs
idkjs / archetype-20171013-embedded-object.js
Created October 14, 2017 07:13 — forked from vkarpov15/archetype-20171013-embedded-object.js
Embedded Objects vs Embedded Types in Archetype
const Archetype = require('archetype');
const assert = require('assert');
const RequestType = new Archetype({
service: {
$type: 'string',
$required: true
},
// `location` is implicitly `$required` because
// `type` and `coordinates` are `$required`
module Route = {
[@bs.module "react-router-dom"] external reactClass : ReasonReact.reactClass = "Route";
let make = (~component=?, ~render=?, ~exact=?, ~path=?, children) =>
ReasonReact.wrapJsForReason(
~reactClass,
~props={
"path": path |> Js.Nullable.from_opt,
"render": render |> Js.Nullable.from_opt,
"component": component |> Js.Nullable.from_opt,
"exact": exact |> ExtUtils.jsOptBool |> Js.Nullable.from_opt