Skip to content

Instantly share code, notes, and snippets.

View ArthurGuy's full-sized avatar

Arthur Guy ArthurGuy

View GitHub Profile
@ArthurGuy
ArthurGuy / CrunchExpenseController.php
Created November 22, 2013 11:14
Crunch Expenses App
<?php
class CrunchExpenseController extends BaseController {
private $rules;
public function __construct()
{
parent::__construct();
@ArthurGuy
ArthurGuy / vestd-stylebot-fixes
Created August 17, 2016 14:19
Style fixes for Vestd
{"vestd.dev, vestd.com":{"_enabled":true,"_rules":{".text-muted, .page-title p, .text-light-greyish-turquoise, .text-lighter-grey, .navbar-default .dropdown-menu li a, .card-item .card-item-body .card-item-body-meta":{"color":"#333"},"body":{"color":"#333"},".well":{"background-color":"#fafafa","box-shadow":"none"}}}}
@ArthurGuy
ArthurGuy / README.MD
Created February 10, 2017 18:51
Raspberry Pi - Start on Boot

File: /etc/rc.local

Execute command such as

  cd /home/pi/app/;
  git pull;
  node /home/pi/app/app.js > /dev/null &
#include "FastLED.h"
#include <CapacitiveSensor.h>
// How many leds in your strip?
#define NUM_LEDS 130
// What pin are the LED's connected to?
#define DATA_PIN 2
// Define the array of leds
@ArthurGuy
ArthurGuy / display.conf
Last active August 10, 2017 12:32
YouTube sign counter
[program:display]
command=python /home/pi/youtube.py
autostart=true
autorestart=true
stderr_logfile=/var/log/youtube.err.log
stdout_logfile=/var/log/youtube.out.log
user=root
@ArthurGuy
ArthurGuy / defcon-sign.ino
Created August 25, 2017 15:17
UK Security Level MI5 Defcon Sign
#include "Particle.h"
#include "neopixel.h"
SYSTEM_MODE(AUTOMATIC);
// IMPORTANT: Set pixel COUNT, PIN and TYPE
#define PIXEL_PIN D2
#define PIXEL_COUNT 120
@ArthurGuy
ArthurGuy / env-json-convert.py
Created January 16, 2020 15:03
Convert a .env file to a json array
#!/usr/bin/env python
import json
import sys
try:
dotenv = sys.argv[1]
except IndexError as e:
dotenv = '.env'
with open(dotenv, 'r') as f:
@ArthurGuy
ArthurGuy / roomba.device.nut
Created December 14, 2013 12:12
Electric Imp device code for communicating with the roomba and reading off the sensor data
imp.configure("Roomba", [], []);
hardware.pin1.configure(DIGITAL_IN_WAKEUP);
hardware.pin2.configure(DIGITAL_OUT_OD_PULLUP);
impWakeupPin <- hardware.pin1;
roombaWakeupPin <- hardware.pin2;
roombaWakeupPin.write(1);
hardware.uart57.configure(115200, 8, PARITY_NONE, 1, NO_CTSRTS);
//Connection will be either 115200 or 57600