Skip to content

Instantly share code, notes, and snippets.

View Forest-Dewberry's full-sized avatar

Forest Dewberry Forest-Dewberry

View GitHub Profile
define :foo1 do
use_synth :dsaw
a,as,b,c,cs,d,ds,e,f,fs,g,gs=0,1,2,3,4,5,6,7,8,9,10,11
as = as*0.75
a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11=0,-1,2,3,4,5,6,7,8,9,10,11
b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11=0,1,2,3,4,5,6,7,8,9,10,11
#call
x = 62
play x, amp: a2, pan: 1*a1, attack: 0.1, attack_level: 0.1, decay: 0.2, decay_level: 1, sustain: 0.5, sustain_level: 0.8, release: 1.5
#sample :ambi_lunar_land, pan: -1
command uses
tee example.txt <<EOF to paste in the contents of example.txt
mkdir -p path/to/directory to create all the folders in a whole path
grep -n -m 1 -r 'searchText' fcinj.json | head -1 to view the first hit of searchText
cat -n file.txt to cat the file with numbers
cat -n file.txt | grep -C 10 -B 11 -A 11 '^\s*44\s' view the 44th line and C for 10 before and after- A and B are after and before
mkdir /mnt/m; sudo mount -t drvfs M: /mnt/m mount windows network drives in wsl
# Generic Chef Api function
function Get-ChefAutomateAPIcall
{
param (
[Parameter(Mandatory = $true)]
[String]$APITOKEN,
#[Parameter(Mandatory = $true)]
[String]$uriExtension,
Get-Module -listavailable
Get-Command -module MyModule
$ tree functions/
functions/
└── MyModule.ps1
> ls .\functions\
Directory: C:\Users\itsme\functions
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---l 6/14/2022 1:35 PM 37452 MyModule.ps1
$modulesFolder = ($env:PSModulePath -split ";")[0]
notepad copyPSmodules.sh
#!/usr/bin/env bashSCRIPT_IS_RUN_FROM=$(pwd)
PS_DEFAULT_DIR="$1"
PS_DEFAULT_DIR="$(wslpath -- "$PS_DEFAULT_DIR")"
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; # get the script dir
# Now loop through every file in MyFunctionsModules
# Each file should have a directory of the same name created in and be copied to that directory.
cd -- "$SCRIPT_DIR"
cd -- "$2"
FILESFROM=$(pwd)
for i in *