Skip to content

Instantly share code, notes, and snippets.

View NeuroWinter's full-sized avatar
🎯
Always something to do.

Alex Manson NeuroWinter

🎯
Always something to do.
View GitHub Profile
# zmodload zsh/zprof # Uncomment this if you need to see what is taking so long to load
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/alex.manson/.oh-my-zsh"
export NVM_LAZY=1
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
"""""""""""""""""""""""""""""""""""""
" Allan MacGregor Vimrc configuration Edited by NeuroWinter
"""""""""""""""""""""""""""""""""""""
set encoding=utf8
call plug#begin('~/.vim/plugged')
" Plugins go here
Plug 'scrooloose/nerdtree'
### Keybase proof
I hereby claim:
* I am NeuroWinter on github.
* I am neurowinter (https://keybase.io/neurowinter) on keybase.
* I have a public key whose fingerprint is E728 FA25 B21A 550E 32F7 8093 30C8 3B98 41AD 0307
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am neurowinter on github.
  • I am neurowinter (https://keybase.io/neurowinter) on keybase.
  • I have a public key ASBAvdv9KnGyHwfr_OuZOgb6s8aY-6HhTHLDqSKJB-7s3go

To claim this, I am signing this object:

import boto3
import time
from datetime import datetime, timedelta
from boto3.dynamodb.conditions import Key, Attr
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('table_name')
now = int(datetime.timestamp(datetime.now()))
three_hours_ago = int(datetime.timestamp(datetime.now() - timedelta(hours=3)))
function Parse(str){
return str.split("\n").map((e, i, arr) => {
console.log(`${i} of ${arr.length}!`); //Like this
if(e.indexOf(':') > -1){
let end = e.split(':').pop();
let first = end.indexOf(`"`);
let last = end.lastIndexOf(`"`);
if(first === last || first < 0) return e.replace(new RegExp('\\\\', 'g') , "\\\\");
function testCompanyInVar (companyName, companyVar) {
for (var i = 0; i < companyVar.length; i++) {
if (companyName == companyVar[i].label) {
return true
};
};
return false
}
find . -type f -name \*.flac -printf "%h\n" |
sort -u |
while read -r dirname; do
new="../flac/$dirname"
echo mkdir -p "$new"
echo cp "$dirname"/*.flac "$new"
jpgs=("$dirname"/*.jpg)
[[ ${#jpgs[@]} -gt 0 ]] && echo cp "$dirname"/*.jpg "$new"
done
Sonification commands - GAC workshop
IM = ImageMagick
Conversions
Image format conversion:
[1] convert image.jpg image.bmp
[2] convert image.jpg image.tga
Convert to RAW:
[3] convert image.jpg -depth 8 rgb:image.raw (rgb raw)
@NeuroWinter
NeuroWinter / ffmpeg cheatsheet for glitching
Last active April 13, 2024 09:09
ffmpeg cheatsheet for glitching
FFMPEG '-i', file, '-c:v', 'libopenjpeg', "jpeg2000\\" + name + ".jp2"\
Convert image to jpeg2000
ffmpeg -i in.png -c:v libopenjpeg out.jp2
Hex Edit out.jp2
ffmpeg -i in.jp2 -c:v png out.png
General Edit
ffmpeg -i input.avi -c:v mpeg2video -g 999 -q:v 1 output.avi
*edit in avidemux/whatever*