Skip to content

Instantly share code, notes, and snippets.

@trevren11
trevren11 / resume.json
Last active June 26, 2023 18:08
Resume
{
"name": "Trevor Renshaw",
"address": "2517 Windy Vane Dr, Pflugerville, TX 78660",
"phone": "(515) 992-6506",
"email": "trevor.renshaw@gmail.com",
"website": "github.com/trevren11",
"experience": [
{
"company": "Facebook/Meta",
"position": "Software Engineer",
@trevren11
trevren11 / cherryPick.ps1
Created August 4, 2020 19:23
Cherry-pick commits into servicing
function CherryPickCommitsToServicing() {
param
(
[Parameter(Mandatory=$true, HelpMessage="Servicing branch to base off of, should be in the format 'servicing/20xx-1.1'")] [string] $ServicingBranch,
[Parameter(Mandatory=$true, HelpMessage="Branch name to make cherry pick to, should be in the format 'user/<user>/<branchName>'")] [string] $CherryPickBranch,
[Parameter(Mandatory=$true, HelpMessage="Message commit for pull request")] [string] $CommitMessage,
[Parameter(Mandatory=$true, HelpMessage="One or multiple commit hashes, all encased by quotations marks and space separated, hash will be applied first to last -> 'hash1 hash2' ")] [string] $CommitHashes,
[Parameter(HelpMessage="Add flag to disable opening chrome to branches tab to create a pr")] [switch] $DontOpenChrome,
[Parameter(HelpMessage="Add flag to disable automatically pushing to hotfix branch")] [switch] $DontPushToBranch
)
@trevren11
trevren11 / Menu.ps1
Last active January 31, 2020 19:34
Basic git menu options to share
###############################################################################
# Simple Textbased Powershell Menu
# Author : Michael Albert
# E-Mail : info@michlstechblog.info
# License: none, feel free to modify
# usage:
# Source the menu.ps1 file in your script:
# . .\menu.ps1
# fShowMenu requieres 2 Parameters:
# Parameter 1: [string]MenuTitle
@trevren11
trevren11 / Menu.ps1
Last active November 21, 2020 02:15
Macros for powershell development
###############################################################################
# Simple Textbased Powershell Menu
# Author : Michael Albert
# E-Mail : info@michlstechblog.info
# License: none, feel free to modify
# usage:
# Source the menu.ps1 file in your script:
# . .\menu.ps1
# fShowMenu requieres 2 Parameters:
# Parameter 1: [string]MenuTitle
@trevren11
trevren11 / luamacros.lua
Last active September 20, 2023 07:48
LuaMacros examples for second keyboard for use with debugging and android studio
-- assign logical name to macro keyboard
-- lmc_assign_keyboard('MACROS')
-- lmc_minimize();
-- lmc_reset();
lmc_say('Loading keyboard configuration')
lmc.minimizeToTray = false
-- lmc_minimize()
-- lmc_load('E:\\lmc.lua')
-- The function returns title of active window. Useful if you want different behaviour of macros depending of active application.
param(
[Parameter(Mandatory = $true)] [string] $ImageFolderPath, # folder location of what files you want to load onto your android device
[Parameter(Mandatory = $true)] [string] $PhoneName, # name that shows up in Your Phone app and folder name where images will sync to on pc, ie "Galaxy S8"
[string] $AndroidPhotoFolderPath = "/sdcard/DCIM/", # android photo folder
[Int32] $WaitTime = 60, # How long to wait for full sync
[string] $ResultFile = "output.log",
[switch] $Help = $FALSE
)
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
@trevren11
trevren11 / test.rb
Created March 31, 2018 00:01
Ruby test for SMS end to end
# example usage:
# ruby test.rb -t -d "Moto G (4)"
require 'sqlite3'
require 'time'
require 'optparse'
options = {phone_number: nil, message_text: nil, device_name: nil}
options[:phone_number] = ENV['espresso_phone']
options[:message_text] = ENV['espresso_message']
@trevren11
trevren11 / play.sh
Last active November 7, 2017 18:31
play.sh
#!/usr/bin/env bash
# cd ReversiServer; java Reversi 10; cd ..
# cd ReversiRandom_Java; java RandomGuy localhost 1; cd ..
# cd Ai; javac Ai.java; java Ai localhost 2 ; cd ..
# Linux commands
killall -9 java
cd server;
javac Player.java && javac Reversi.java && java Reversi 10 > ../output/server.log &
import java.awt.*;
import java.util.*;
import java.awt.event.*;
import java.lang.*;
import java.io.*;
import java.net.*;
import javax.swing.*;
import java.math.*;
import java.text.*;
@trevren11
trevren11 / regex.vi
Created April 2, 2017 19:14
Common regex expressions
Remove first 5 characters from file
%s/^.\{0,5\}//