Skip to content

Instantly share code, notes, and snippets.

View t1m0thyj's full-sized avatar

Timothy Johnson t1m0thyj

  • Pittsburgh, PA
  • 09:25 (UTC -05:00)
View GitHub Profile
@t1m0thyj
t1m0thyj / pisysinfo.sh
Last active May 25, 2022 19:04
Set up phpSysInfo with lighttpd and PHP 7 on Raspbian Stretch
#!/usr/bin/env bash
# Install lighttpd and PHP 7
sudo apt-get -y install lighttpd
sudo apt-get -y install php-cgi php php-xml
sudo lighty-enable-mod fastcgi-php
sudo service lighttpd force-reload
# Install phpSysInfo from GitHub
wget https://github.com/phpsysinfo/phpsysinfo/archive/stable.zip -O ~/Downloads/phpsysinfo-stable.zip
@t1m0thyj
t1m0thyj / assistant_library_with_local_commands_demo.py
Created October 22, 2017 03:27
Custom src/main.py script for Google Assistant on Raspberry Pi
#!/usr/bin/env python3
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@t1m0thyj
t1m0thyj / main.py
Last active February 4, 2023 09:10
Play music from YouTube in Google Assistant on Raspberry Pi
#!/usr/bin/env python3
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@t1m0thyj
t1m0thyj / timeInterval.fs
Last active May 11, 2022 10:56
Implementation of time interval problem in F# with error handling
// Coded online at https://repl.it/@t1m0thyj/F-Scratchpad-1
open System
let dateStr = "1/1/2000,2/29/2000,2/29/2004,2/29/2008,2/29/2012,2/29/2016,3/14/15 9:26:53"
let getDayDiff (date1:string, date2:string) =
let couldParse, startDate = DateTime.TryParse date1
if (not couldParse) then failwithf "Date '%s' is not valid" date1
let couldParse, endDate = DateTime.TryParse date2
@t1m0thyj
t1m0thyj / 24hr-clock.py
Last active May 22, 2021 19:27
Digital clock with automatic brightness using Scroll pHAT HD
import sys
import time
from datetime import datetime
import scrollphathd as sphd
from gpiozero import LightSensor
LDR_PIN = 24
MAX_BRIGHTNESS = 0.2
@(
'7zip'
'arduino'
'audacity'
'cinebench'
'conemu'
'crystaldiskinfo'
'filezilla'
'firacode-ttf'
'firefox'
; code adapted from https://www.autohotkey.com/boards/viewtopic.php?f=76&t=61040
~^+z::
if WinExist("ahk_class wcl_manager1",, "Cisco Webex Meetings")
{
current_ID =
if !WinActive("ahk_class wcl_manager1",, "Cisco Webex Meetings")
{
WinGet, current_ID, ID, A
WinActivate
}
apiVersion: v2
publisher: che-incubator
name: typescript
version: 1.35.1
type: VS Code extension
displayName: Typescript
title: Typescript language features
description: Typescript language features
icon: https://www.eclipse.org/che/images/logo-eclipseche.svg
repository: https://github.com/Microsoft/vscode
{
"private": true,
"dependencies": {
"typescript": "latest",
"@theia/typescript": "next",
"@theia/navigator": "next",
"@theia/terminal": "next",
"@theia/outline-view": "next",
"@theia/preferences": "next",
"@theia/messages": "next",
apiVersion: v2
publisher: websi96
name: rexx-syntax-highlighting
version: 1.0.2
type: VS Code extension
displayName: rexx-syntax-highlighting
title: rexx-syntax-highlighting
description: syntax highlighting of the rexx language
icon: https://www.eclipse.org/che/images/logo-eclipseche.svg
repository: