This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openAuthoriseWindow = (url) -> | |
waitForPin = -> | |
if wnd.closed | |
pin = prompt("Please enter your PIN", "") | |
oauth.setVerifier pin | |
oauth.fetchAccessToken getSomeData, failureHandler | |
else | |
setTimeout waitForPin, 100 | |
wnd = window.open(url, "authorise") | |
setTimeout waitForPin, 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* Author: Andreas Spiess, 2017 | |
* Author: Rob Griffiths | |
* | |
This sketch receives ESP-Now message and sends it as an MQTT messge | |
It is heavily based on of Anthony's gateway setch sketch | |
https://github.com/HarringayMakerSpace/ESP-Now | |
Anthony Elder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# REQUIRES SUDO | |
# Benchmark runner | |
repeats=20 | |
output_file='benchmark_results.csv' | |
command_to_run='echo 1' | |
run_tests() { | |
# -------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$image = new Imagick('kiwi.png'); // https://s13.postimg.org/hakfstg1j/kiwi.png | |
$image->setImageBackgroundColor(new ImagickPixel('white')); // set the background color of the image | |
$image->setImageAlphaChannel(Imagick::ALPHACHANNEL_BACKGROUND); // ALPHACHANNEL_BACKGROUND is undocumented and has a value of 2 | |
// save a JPEG | |
$image->setImageFormat('jpeg'); | |
$image->setImageCompression(Imagick::COMPRESSION_JPEG); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Applications/VirtualBox.app/Contents/MacOS/VBoxManage showvminfo debian --machinereadable | |
name="debian" | |
groups="/" | |
ostype="Debian (64 bit)" | |
UUID="323105ea-d8f6-4898-ae9e-459b3d642b23" | |
CfgFile="/Users/rgrif/VirtualBox VMs/debian/debian.vbox" | |
SnapFldr="/Users/rgrif/VirtualBox VMs/debian/Snapshots" | |
LogFldr="/Users/rgrif/VirtualBox VMs/debian/Logs" | |
hardwareuuid="323105ea-d8f6-4898-ae9e-459b3d642b23" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
{ | |
"keys": ["enter"], | |
"command": "run_macro_file", | |
"args": { | |
"file": "res://Packages/Default/Add Line in Braces.sublime-macro" | |
}, | |
"context": | |
[ | |
{ "key": "setting.auto_indent", "operator": "equal", "operand": true }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
07730 217 054 | |
07730 217 064 | |
07730 217 073 | |
07730 217 076 | |
07730 217 080 | |
07730 217 093 | |
07730 217 098 | |
07730 217 100 | |
07730 217 117 | |
07730 217 131 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var passport = require('passport'); | |
var BearerStrategy = require('passport-http-bearer').Strategy; | |
var Posts = function () { | |
var strategy = new BearerStrategy({ session: false }, function ( token, done ) { | |
if (token == '1234567890') { | |
return done(null, {username: "someuser"}); | |
} | |
return done(null); |
NewerOlder