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
function a(b) {
c = "", d = b.split("\e"); // split the input into lines by using \e as the delimitator
for (var e = 0; e < d.length; e++) {
f = d[e].replace(/^\s+|\s+$/g, ''); // removes white space
if (f.indexOf("begin") === 0 || f.indexOf("end") === 0 || f === "") continue; // skip the lines that start with begin, end or are empty
var g = (f.charCodeAt(0) - 32) & r3;
for (var h = 1; h < f.length; h += 4) {
if(h + 3 >= f.length) break; // if the line is shorter than 4 characters, break the loop
var i = (f.charCodeAt(h) - 32) & r3,
j = (f.charCodeAt(h + 1) - 32) & 63,
# 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)