This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <FastLED.h> | |
FASTLED_USING_NAMESPACE | |
#define LED_TYPE APA102 | |
#define COLOR_ORDER GBR | |
#define NUM_LEDS 288 | |
CRGB leds[NUM_LEDS]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <SoftwareSerial.h> | |
#include <FastLED.h> | |
// How many leds in your strip? | |
#define NUM_LEDS 29 | |
#define DATA_PIN A9 // A9 // 23 | |
#define MAX_BRIGHTNESS 255 // 64 - 255 is acceptable | |
// Lightning stuff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\winlogon.exe\PerfOptions] | |
"CpuPriorityClass"=dword:00000003 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param([switch]$Elevated) | |
function Test-Admin { | |
$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent()) | |
$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) | |
} | |
if ((Test-Admin) -eq $false) { | |
if ($elevated) { | |
# tried to elevate, did not work, aborting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
sudo apt-get update | |
sudo apt-get install openssh-server -y | |
sudo usermod -aG sudo ${USER} | |
sudo apt install nvidia-cuda-toolkit -y | |
sudo ubuntu-drivers autoinstall | |
sudo apt update | |
sudo apt-get install nvidia-utils-510 -y | |
## sudo vi /lib/modprobe.d/nvidia-graphics-drivers.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LINUX_VERSION=5.9-rc7 | |
LINUX_KERNEL_VERSION=mainline-${LINUX_VERSION} | |
ZFS_VERSION=0.8.6 | |
# Find ROOT_DIR | |
ROOT_DIR=/c | |
if [ ! -z "$(ls -A /mnt/c)" ]; then | |
ROOT_DIR=/mnt/c | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let textNodesUnder = (el) => { | |
var n, a=[], walk=document.createTreeWalker(el, NodeFilter.SHOW_TEXT, null, false); | |
while(n = walk.nextNode() ) a.push(n); | |
return a; | |
} | |
let makeProjectLink = (dev) => `https://github.com/itrvl/itrvl/issues/${dev.replace(/[^0-9]+/mg, '')}`; | |
let makeProjectLinks = (line) => { | |
let projectLinks = line.match(/\[dev-([0-9]+)\]/igm); | |
projectLinks && projectLinks.map((devLink) => { | |
let link = makeProjectLink(devLink); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let textNodesUnder = (el) => { | |
var n, a=[], walk=document.createTree | |
while(n = walk.nextNode() ) a.push(n) | |
return a; | |
} | |
let makeProjectLink = (dev) => `https:/ | |
let makeProjectLinks = (line) => { | |
let projectLinks = line.match(/\[dev- | |
projectLinks && projectLinks.map((dev | |
let link = makeProjectLink(devLink) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import randomNumber from 'random-number-csprng'; | |
import Hashids from 'hashids'; | |
const range = 1000000; | |
const salty = 'SaltyMcSaltFace' | |
export const generateSaltedHash = async (number = Date.now(), salt = salty, len = 8) => { | |
const Hash = new Hashids(salt, len); | |
const prn = await randomNumber(-1 * range, range); | |
return Hash.encode(number, Math.abs(prn)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class TextureLooper : MonoBehaviour | |
{ | |
//An array of Objects that stores the results of the Resources.LoadAll() method | |
private Object[] objects; | |
//Each returned object is converted to a Texture and stored in this array | |
private Texture[] textures; | |
//With this Material object, a reference to the game object Material can be stored |
NewerOlder