Skip to content

Instantly share code, notes, and snippets.

Larry Gadea lg

Block or report user

Report or block lg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lg
lg / currentline.psm1
Created Jun 9, 2019
current line in script
View currentline.psm1
$tocontinue = $MyInvocation.MyCommand.ScriptBlock.ToString().split([Environment]::NewLine)[(Get-PSCallStack).Position.StartLineNumber,-1] -join [Environment]::NewLine | Out-String
@lg
lg / cloudygamer.psm1
Last active Jun 9, 2019
CloudyGamer initialization script (run manually up to each ###### line)
View cloudygamer.psm1
# CloudyGamer
#
# CURRENTLY WRITTEN FOR PAPERSPACE (see link above for additional azure/aws items)
# based off of: https://github.com/lg/cloudy-gamer/blob/master/cloudygamer.psm1
#
# troubleshooting:
# 1. latency spikes:
# - if hooked up to an external monitor, disconnect
# - if on wifi, try wired
# - if wired and on a fancy switch, turn on/off congestion control on the port
@lg
lg / paperspace-gaming.ps1
Last active Oct 5, 2018
A script to provision a new Paperspace machine for gaming
View paperspace-gaming.ps1
# init stuff
Install-PackageProvider -Name NuGet -Force
mkdir c:\cloudygamer\downloads
Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "DontUsePowerShellOnWinX" -Value 0
################
# install steam first since windows updates will take forever (and you can install games)
(New-Object System.Net.WebClient).DownloadFile("https://steamcdn-a.akamaihd.net/client/installer/SteamSetup.exe", "c:\cloudygamer\downloads\steamsetup.exe")
@lg
lg / test.css
Last active Aug 19, 2017
Animating elements in an SVG via CSS (see live example here: https://lg.io/assets/extern/css-svg/test.html)
View test.css
@keyframes hover {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(3px); }
}
#cow {
animation: hover 1.0s infinite ease;
}
#bang {
@lg
lg / cloudy-gamer-launcher.sh
Last active Sep 29, 2019
Easily start/stop Paperspace and Parsec instances
View cloudy-gamer-launcher.sh
#!/bin/bash
#
# CloudyGamerLauncher by Larry Gadea
# Easily start/stop Paperspace and Parsec instances
#
# Make sure to fill out the variables below. For the machine id, use the
# 8-letter identifier for the machine on Paperspace (ex. PS8RGDUY)
#
# Note: Requires Paperspace API key (generate one in account settings)
@lg
lg / just-in-time-babel.js
Last active Jan 28, 2017
Use ES2017 async functions on browsers that don't support it (like Safari)
View just-in-time-babel.js
// JustInTimeBabel by Larry Gadea
// Use ES2017 async functions on browsers that don't support it (like Safari)
//
// Example usage:
//
// <script src='just-in-time-babel.js'></script>
// <script>
// async function pong() {
// await new Promise(resolve => setTimeout(resolve, 1000))
// console.log("pong!")
@lg
lg / update-cloudflare-v4-ip.sh
Created Dec 4, 2016
Update router IP address on CloudFlare using their v4 API
View update-cloudflare-v4-ip.sh
#!/bin/sh
#
# cloudflare v4 ip updater for edgerouter
#
# this uses the v4 api which ddclient doesn't support directly. though v1 api of cloudflare is still active, we've disabled it (for SAML support), so v4 is mandatory.
# updating the ip of a hostname is a 3 step process:
#
# 1. get the list of zones:
# curl -X GET "https://api.cloudflare.com/client/v4/zones" -H 'X-Auth-Email: ***CLOUDFLARE-EMAIL***' -H 'X-Auth-Key: ***CLOUDFLARE-TOKEN***' -H 'Content-Type: application/json'
# 2. get the DNS records in a zone (by the id returned above)
@lg
lg / angry_wifi.sh
Last active Jul 29, 2018
auto disconnects clients with a low signal strength on LEDE / OpenWRT
View angry_wifi.sh
#!/bin/ash
#
# angry_wifi.sh
#
# auto disconnects clients with a low signal strength on LEDE / OpenWRT. great
# for clients who hold onto a lower-signal-strength accesspoint instead of
# roaming. before running, make sure to download the latest MAC addresses with:
#
# wget --no-check-certificate -O - 'https://services13.ieee.org/RST/standards-ra-web/rest/assignments/download/?registry=MAC&text=apple' | cut -d, -f2 > apple_mac_addresses
#
@lg
lg / uap-ac-lite-openwrt.txt
Last active Jun 21, 2019
making the ubnt wifi awesome (uap ac lite) w/ openwrt
View uap-ac-lite-openwrt.txt
making the ubnt wifi awesome (uap ac lite) w/ lede (openwrt)
the reasons you would do this:
- you get 802.11r
- you get better roaming
- you get access to some new 5ghz channels
I AM NOT TO BE HELD RESPONSIBLE FOR ANYTHING IN HERE. DO AT YOUR OWN RISK. THANK YOU AND HAVE A LOVELY DAY.
** note that though we're using Lede, it's essentially openwrt minus the drama
@lg
lg / build_tvvlckit.sh
Last active Mar 22, 2018
Building MobileVLCKit for AppleTV: TVVLCKit
View build_tvvlckit.sh
# note these instructions are as of Dec 28, 2015
# the vlc and vlckit repos are super complex and have thousands of dependencies from everywhere on the internet.
# so, you'll need to mess with things a bit
git clone http://code.videolan.org/videolan/VLCKit.git
cd VLCKit
./buildMobileVLCKit.sh -t
You can’t perform that action at this time.