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 <Adafruit_NeoPixel.h> | |
/** | |
* NEO Pixel Turn signals. | |
* Author: Timothy Lorens <tlorens@cyberdyne.org> | |
* Date: 07/05/2018 | |
* | |
* Simple sequential (sweeping) Turn signal logic with dim solid red run state lights | |
* along with white reverse light. AnalogRead() is used to determine if there's voltage | |
* on one of the analog pins. Since the blinker relay isn't consistent our loop should be |
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
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
Database files have to be updated before starting the server, here are the steps that had to be followed: | |
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
brew unlink postgresql | |
brew install postgresql@9.6 | |
brew unlink postgresql@9.6 | |
brew link postgresql |
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
package shckio | |
import ( | |
"bufio" | |
"log" | |
) | |
func GetCh(rw *bufio.ReadWriter) byte { | |
ch, _ := rw.ReadByte() | |
log.Println(string(ch)) |
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
/** | |
* @Route("/chunks", name="chunks") | |
*/ | |
public function sendFileAction() | |
{ | |
$jar = new \GuzzleHttp\Cookie\SessionCookieJar('SESSION_STORAGE', true); | |
$handler = new CurlHandler(); | |
$stack = HandlerStack::create($handler); | |
$client = new Client(['cookies'=>true, 'handler' => $stack]); | |
$filename = 'files/huge-1gig-file.jpg'; |
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
### Keybase proof | |
I hereby claim: | |
* I am tlorens on github. | |
* I am tlorens (https://keybase.io/tlorens) on keybase. | |
* I have a public key whose fingerprint is 78E1 09B9 CFC6 48DA 2194 D8F1 10CE 51D0 D808 CDE1 | |
To claim this, I am signing this object: |
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: Timothy Lorens <tlorens@cyberdyne.org> | |
* Date: Jan 2016 | |
* Larson scan turn signal code for Arduino | |
* | |
*/ | |
#include <Adafruit_NeoPixel.h> | |
#define LeftSignal A5 |
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
<config> | |
<channels> | |
<channel id="1" title="red candy canes" pin="1" mode="onoff" /> | |
<channel id="2" title="snowman" pin="4" mode="onoff"> | |
<frequencies> | |
<frequency> | |
<min>1000</min> | |
<max>3000</max> | |
</frequency> |
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 <Metro.h> | |
#include <SPI.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
#define OLED_RESET 4 | |
Adafruit_SSD1306 display(OLED_RESET); | |
#if (SSD1306_LCDHEIGHT != 64) |
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
/* | |
* A driver for the Griffin Technology, Inc. "PowerMate" USB controller dial. | |
* | |
* v1.1, (c)2002 William R Sowerbutts <will@sowerbutts.com> | |
* | |
* This device is a anodised aluminium knob which connects over USB. It can measure | |
* clockwise and anticlockwise rotation. The dial also acts as a pushbutton with | |
* a spring for automatic release. The base contains a pair of LEDs which illuminate | |
* the translucent base. It rotates without limit and reports its relative rotation | |
* back to the host when polled by the USB controller. |
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
root@odroidu:/storage/sdcard0 # cat boot.ini | |
ODROID4412-UBOOT-CONFIG | |
setenv v_out "hdmi" | |
setenv fake_fb "true" | |
setenv fb_x_res "1280" | |
setenv fb_y_res "720" | |
setenv hdmi_phy_res "720" | |
setenv led_blink "1" | |
setenv bootcmd "movi read kernel 0 40008000;movi read rootfs 0 41000000 100000;bootm 40008000 41000000" | |
setenv bootargs "console=/dev/ttySAC1,115200n8 androidboot.console=ttySAC1 v_out=${v_out} fake_fb=${fake_fb} fb_x_res=${fb_x_r |
NewerOlder