Skip to content

Instantly share code, notes, and snippets.

View rveitch's full-sized avatar

Ryan Veitch rveitch

View GitHub Profile
@rveitch
rveitch / retropi-setup.md
Last active February 1, 2025 00:34
RetroPie Setup

Things to download

Setup

Format the SD Card

@rveitch
rveitch / upgrading-to-node-10.15.md
Last active January 4, 2019 19:54
Upgrading to Node 8.x

Upgrading to Node 10.15

  • Use $ nvm ls to check your currently installed version. Set this version in the reinstall-packages-from flag in the next step.
  • $ nvm install 10.15.0 --reinstall-packages-from=10.14.2
  • $ nvm alias default 10.15.0
  • Install dependencies again: npm install
  • Set your PHPStorm node interpreter version to 10.15.0 image
@rveitch
rveitch / 128X64_ SSD1306_LCD_Display_Clock_Example.ino
Created October 28, 2017 23:38
Particle Photo w/ LCD - Clock Example Code
#include "Adafruit_SSD1306.h"
/****************************************************
The connection of the OLED to my Particle Photon is
VCC = 3.3V
GND = GND
SCL = A5 / D1*
SDA = A4 / D0*
****************************************************/
@rveitch
rveitch / particle_temp_sensor.ino
Created September 26, 2017 21:41
Particle Temperature Sensor
#include <Adafruit_DHT.h>
#include "Adafruit_DHT.h"
#define DHTPIN 2 // what pin we're connected to
#define DHTTYPE DHT22 // DHT 22 (AM2302)
DHT dht(DHTPIN, DHTTYPE);
void setup() {
dht.begin();
@rveitch
rveitch / timezones.js
Created August 24, 2017 20:23
Timezone Strings JS Object
timezones = {
groups: [
{
label: 'Africa',
options: [
{ value: 'Africa/Abidjan', label: 'Abidjan', selected: false },
{ value: 'Africa/Accra', label: 'Accra', selected: false },
{ value: 'Africa/Addis_Ababa', label: 'Addis Ababa', selected: false },
{ value: 'Africa/Algiers', label: 'Algiers', selected: false },
{ value: 'Africa/Asmara', label: 'Asmara', selected: false },
@rveitch
rveitch / zapier-template-text.md
Last active August 23, 2017 16:13
Zapier Template Boilerplate Text

[ Value Statement: 2-4 sentences of UNIQUE copy for each Zap template ]

Note: [ Optional, such as "This Zapier integration doesn't import already registered event attendees into Zoho CRM, only new attendees after you've set it up." ]

How this App-App integration works [eg. "How this Gmail-Trello integration works"]

  1. [ This new event happens in the Trigger app ]
  2. [ Zapier does this event in the Action app ]

Apps involved

  • cos-message-create-edit (allImages, etc)
  • import PhotosUtils from 'web/utils/photos-utils';
  • cos-ui-picker-multiservice
  • cos-ui-picker-service
  • cos-ui-picker-select
  • cos-ui-post-item
  • media-gallery
  • image-gallery
    • import DragDropMixin from '../mixins/drag-drop';
  • cos-ui-picker-transloadit-upload
@rveitch
rveitch / sheohl-xru.json
Last active February 1, 2025 00:34
Sheolh Xbox JSON Feed from XRU
{"gameClips":[{"gameClipId":"49724d5a-c327-4571-809c-4440719b26bd","state":"Published","datePublished":"2017-05-26T04:43:15.962608Z","dateRecorded":"2017-05-26T04:15:23Z","lastModified":"2017-05-26T04:43:15.962608Z","userCaption":"","type":"UserGenerated","durationInSeconds":28,"scid":"d1adc8aa-0a31-4407-90f2-7e9b54b0347c","titleId":94618376,"rating":0,"ratingCount":0,"views":0,"titleData":"","systemProperties":"5f71916c-f873-4dba-9430-ec99fef2a774;","savedByUser":true,"achievementId":"","greatestMomentId":"","thumbnails":[{"uri":"https://gameclipscontent-t2004.xboxlive.com/xuid-2533274811258162-public/49724d5a-c327-4571-809c-4440719b26bd_Thumbnail.PNG","fileSize":0,"thumbnailType":"Small"},{"uri":"https://gameclipscontent-t2004.xboxlive.com/xuid-2533274811258162-public/49724d5a-c327-4571-809c-4440719b26bd_Thumbnail.PNG","fileSize":0,"thumbnailType":"Large"}],"gameClipUris":[{"uri":"https://gameclipscontent-d2004.xboxlive.com/xuid-2533274811258162-private/49724d5a-c327-4571-809c-4440719b26bd.MP4?sv=2015-12-11
@rveitch
rveitch / sync_acf_post_title.php
Last active February 1, 2025 00:34
Update WordPress post title from an ACF field value on save. (Advanced Custom Fields)
<?php
/**
* Update Post Title from an ACF field value on post save.
*
* Triggers on save, edit or update of published posts.
* Works in "Quick Edit", but not bulk edit.
*/
function sync_acf_post_title($post_id, $post, $update) {
$acf_title = get_field('my_acf_field_name', $post_id); // NOTE: enter the name of the ACF field here
@rveitch
rveitch / UV4L.md
Created May 6, 2017 04:01
How to install or upgrade UV4L on Raspbian Wheezy & Raspbian Jessie (for Raspberry Pi)

How to install or upgrade UV4L on Raspbian Wheezy & Raspbian Jessie (for Raspberry Pi)

As the following installation instructions are updated and improved very frequently, it is suggested to read them from scratch in case of problems and especially whenever a new UV4L module is announced.

UV4L consists of a series of drivers, a Streaming Server and various extensions for the server. Below we will see how to install all the components to get the best from UV4L, with particular focus on the Raspberry Pi (Dual) Camera Board driver, although all other drivers can be installed similarly.

To install UV4L open a terminal and type the following commands: $ curl http://www.linux-projects.org/listing/uv4l_repo/lrkey.asc | sudo apt-key add - Add the following line to the file /etc/apt/sources.list : deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/ wheezy main