Skip to content

Instantly share code, notes, and snippets.

View TimSmith714's full-sized avatar

Tim Smith TimSmith714

  • West Sussex UK
View GitHub Profile
@TimSmith714
TimSmith714 / RGBXmasTree_RedGreenCycle.py
Created December 20, 2023 17:09
For the RGB Christmas Tree hat, this cycles between red and green for a more Christmassy effect
from tree import RGBXmasTree
from time import sleep
tree = RGBXmasTree()
bottomRow = [0,16,15,6,12,24,19,7]
middleRow = [1,17,14,5,11,23,20,8]
topRow = [2,18,13,4,10,22,21,9]
star = [3]
rows = [bottomRow, middleRow, topRow, star]
#r "Newtonsoft.Json"
using System.Net;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Primitives;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
public static async Task<IActionResult> Run(HttpRequest req, ILogger log)
{
@TimSmith714
TimSmith714 / SouthernStatusEmailer.rb
Last active May 25, 2016 13:20
Get the status of some lines and email
require 'nokogiri'
require 'date'
require 'open-uri'
require 'mail'
options = { :address => 'STMPSERVER',
:port => 'PORT',
:user_name => 'USERNAME',
:password => 'PASSWORD',
:authentication => 'plain',
@TimSmith714
TimSmith714 / SouthernStatusScraper1.rb
Created May 24, 2016 22:02
Southern Railway status scraper
require 'nokogiri'
require 'date'
require 'open-uri'
lineCodes = ['.bm', '.ge','.re','.me']
goodLines = []
problemLines = []
subjectLine = ''
body = ''