Skip to content

Instantly share code, notes, and snippets.

View punkscience's full-sized avatar

Darryl Wright punkscience

View GitHub Profile
@punkscience
punkscience / injection.js
Created December 20, 2021 15:59
Simple HTML Code Injection Script
let newContent = '<h1 class="injected">Inserted Stuff</h1><h2 class="injected">The following content has been injected.</h2><p class="injected" id="target_element"></p>';
document.body.innerHTML = newContent + document.body.innerHTML;
var targetElements = document.getElementsByClassName('injected');
console.log( targetElements );
if( targetElements != undefined ) {
for( var i=0; i<targetElements.length; i++ ) {
let e = targetElements[i];
In order to watch and print the real time log while the Unity editor is building, opening etc. Use the following command:
tail -f [LOG FILE]
The file is located:
Mac:
~/Library/Logs/Unity/Editor.log
@punkscience
punkscience / folderwalk.py
Created May 5, 2020 13:58
Snippet of code to recursively walk a folder and all files in python.
import os
import sys
walk_dir = sys.argv[1]
print('walk_dir = ' + walk_dir)
def process( folder ):
for root, subdirs, files in os.walk( folder ):
for subdir in subdirs:
@punkscience
punkscience / chilirecipe.md
Last active January 22, 2020 03:27
Lazy Man's Load: Darryl's Slow Cooker Chili Recipe

Lazy Man's Load: Darryl's Slow Cooker Chili Recipe

The following recipe was originally based on one I found online. It has since been tweaked, fixed, updated and adapted over time to be my ideal chili. The name "Lazy Man's Load" was what my dad used to call trying to reduce the amount of work I needed to do by carrying everything at once and winding up dropping it all. That's exactly what this recipe is all about.

First, the Chili Seasoning

  • 2 Tbs Ground Chili Powder
  • 1 Tbs Ground Cumin
  • 1 Tbs Dried Oregano
  • 1 Tbs Cinnamon
  • 1 Tbs Curry Powder
### Keybase proof
I hereby claim:
* I am eyesno on github.
* I am punkscience (https://keybase.io/punkscience) on keybase.
* I have a public key ASDD40LFFGZC3OfnippJp2y5IGWu8wIYsGdk4zRwonWhFwo
To claim this, I am signing this object:
@punkscience
punkscience / resume.json
Last active December 18, 2019 02:50
My Resume
{
"meta": { "theme": "spartan" },
"basics": {
"name": "Darryl Wright",
"label": "Managing Director / Senior Software Developer",
"email": "darryl@punkscience.ca",
"phone": "(902) 580-5461",
"website": "http://punkscience.ca",
"summary": "A Managing Director and developer with over 20 years experience in systems software engineering, project management, teambuilding and studio operations. Experienced in numerous industries from consulting and telecommunications to oil and finance. Most recently and for the majority of my career I have been developing high performance AAA video games on console, desktop, and mobile.",
"location": {
@punkscience
punkscience / gist:72b62dec707936e76071e3f9d4dd3697
Last active May 18, 2018 15:07
Google Sheets formula to calculate the elapsed workdays (weekdays) between two dates when end date is present or up until now.
// Where C2 = possibly blank start date and D2 = possibly blank end date.
=if(not(isblank(C2)),if(isblank(D2),networkdays(C2,TODAY()),networkdays(C2,D2)),)