Skip to content

Instantly share code, notes, and snippets.

View JustGoscha's full-sized avatar
↩️
Swifting!

Goscha Graf JustGoscha

↩️
Swifting!
View GitHub Profile
@JustGoscha
JustGoscha / index.html
Created February 11, 2019 00:11
justGoscha #artvsartist
<header>
#ArtVsArtist
<h1>
<a href="https://twitter.com/justgoscha">
justGoscha
</a>
</h1>
</header>
<div id="container">
@JustGoscha
JustGoscha / countcommits.js
Last active April 17, 2018 18:14
Counting commits in all subfolders per User
const util = require('util')
const path = require('path')
const fs = require('fs')
const fsStat = util.promisify(fs.stat)
const exec = util.promisify(require('child_process').exec);
fs.readdir('.', async (err, files) => {
@JustGoscha
JustGoscha / sh
Created July 27, 2016 10:14
Creepy fun on Mac terminal
nohup /bin/bash -c 'WORDS=("please help me" "i am so alone" "i am lonely" "pssssst" "hello" "hey, listen."); while [ 1 = 1 ]; do say "${WORDS[$[ $[ RANDOM % ${#WORDS[@]} ]]]}" -v Whisper -r 1.5; sleep 3; done' &
@JustGoscha
JustGoscha / gist:fc19c8585446936cdba4
Last active August 29, 2015 14:13
NodeJS server configuration best practices
#Best practices when running Node.js with port 80 (Ubuntu / Linode):
http://stackoverflow.com/questions/16573668/best-practices-when-running-node-js-with-port-80-ubuntu-linode
# Running stuff in background, handling child processes, storing PIDs etc.:
http://mywiki.wooledge.org/ProcessManagement#How_do_I_kill_a_process_by_name.3F__I_need_to_get_the_PID_out_of_ps_aux_.7C_grep_....
# Git for website management
http://toroid.org/ams/git-website-howto
http://programmers.stackexchange.com/questions/210851/how-to-make-a-git-push-update-files-on-your-web-host
http://stackoverflow.com/questions/883878/update-website-with-a-single-command-git-push-instead-of-ftp-drag-and-dropping
@JustGoscha
JustGoscha / webaudioBufferCreation.js
Last active June 8, 2018 10:11
Dynamically create a WebAudio buffer (with noise) and play it!
var AudioContext = AudioContext || webkitAudioContext || mozAudioContext;
var context = new AudioContext();
var node = context.createBufferSource()
, buffer = context.createBuffer(1, 4096, context.sampleRate)
, data = buffer.getChannelData(0);
for (var i = 0; i < 4096; i++) {
data[i] = Math.random();
}
node.buffer = buffer;