This file contains 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 | |
SESSION=session-name | |
# Create a new tmux session named $SESSION with a window named code | |
tmux new-session -d -n code -s $SESSION | |
# Create a 5 lines tall panel in $SESSION and run `grunt watch` | |
tmux split-window -d -l 5 -t $SESSION:code 'grunt watch' | |
# Attach $SESSION to the terminal |
This file contains 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
# Author: Rodrigo Chamun | |
# How to run: | |
# Server: ruby jokenpo.rb | |
# Players: $ nc server_address 6666 - 2>/dev/null | |
require 'socket' | |
require 'forwardable' | |
class Move |
This file contains 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
void setup() { | |
size(600, 600); | |
} | |
void draw() { | |
background(#ffffff); | |
int steps = 4; | |
PVector a = new PVector(100, 200); | |
PVector b = new PVector(500, 200); | |
PVector c = PVector.add(a, PVector.sub(b, a).rotate(radians(60))); |
This file contains 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
// https://bongo.cat/ | |
// Copy and paste in the browser console. | |
const playNote = key => { | |
const downEvent = new KeyboardEvent('keydown', { 'key': key } ) | |
const upEvent = new KeyboardEvent('keyup', { 'key': key } ) | |
document.dispatchEvent(downEvent); | |
setTimeout(() => document.dispatchEvent(upEvent), 100); | |
} |