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
#include <Arduino.h> | |
#include <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
#include <ESP8266WebServer.h> | |
#include <ESP8266mDNS.h> | |
#include "image.h" | |
const char *ssid = "your wifi ssid"; | |
const char *password = "your wifi password"; |
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
#include "Arduino.h" | |
#include "timeout.h" | |
void runtest1() | |
{ | |
using namespace esp8266; | |
polledTimeoutOneShot timeout(3000); | |
Serial.print("before while 1\n"); | |
while(!timeout.expired()) |
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
#!/usr/bin/env bash | |
# Installs ffmpeg from source (HEAD) with libaom and libx265, as well as a few | |
# other common libraries | |
# binary will be at ~/bin/ffmpeg | |
sudo apt update && sudo apt upgrade -y | |
mkdir -p ~/ffmpeg_sources ~/bin | |
export PATH="$HOME/bin:$PATH" |
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
/* | |
* 6-sided play cube | |
*/ | |
$fn = 128 ; | |
WIDTH = 64 ; | |
DOT_DEEP = 3 ; | |
DOT_DENSITY = .2 ; | |
DOT_TABLE = [ | |
[ 2, [ 2, 3, 4, 5, 6 ] ] |
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
-- Create a group | |
CREATE ROLE readaccess; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO readaccess; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
-- Grant access to future tables | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
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
/* | |
Chrome Packaged app Bluetooth API test | |
Before interacting with a BT device, you need to : | |
1) get the device MAC and service UUID with startDiscovery and getServices methods | |
2) request permission with chrome.permissions.request | |
3) add the service profile with chrome.bluetooth.addProfile (a profile is only {uuid:'xxxxxxx...'}) | |
*/ | |
// onConnection callback | |
chrome.bluetooth.onConnection.addListener( |
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 | |
# readonlyroot.sh -- Setup dirs on the tmpfs to keep the root partition read-only | |
# See-Also: http://roland.entierement.nu/pages/debian-on-soekris-howto.html | |
# Available-At: https://gist.github.com/1216392 | |
# | |
# Place this file in /etc/init.d and run: | |
# sudo update-rc.d readonlyroot.sh start 04 S | |
# | |
# To maintain persistent data, place a file at /etc/cron.d/readonlyroot as: | |
# 0 * * * * root /etc/init.d/readonlyroot.sh save >/dev/null |