Skip to content

Instantly share code, notes, and snippets.

View caillou's full-sized avatar

Pierre Spring caillou

View GitHub Profile
@caillou
caillou / foo1.coffee
Last active August 29, 2015 13:57
CoffeeScript is mad!
(->
x = ->
foo = false
# If a variable is used after a function definition
# for the first time...
foo = true
)()
@caillou
caillou / gist:11077724
Created April 19, 2014 08:18
Naturally Aligned
// I love the fact that my code aligns perfectly due to the fact that ...
console.log('top|bottom'.length === 'left|right'.length);
// ... returns true.
$overlay.data('region', region)
.css({
top: (region === 'bottom') ? '50%' : 0,
bottom: (region === 'top') ? '50%' : 0,
left: (region === 'right') ? '50%' : 0,
right: (region === 'left') ? '50%' : 0
npm ERR! tar.unpack untar error /var/folders/j3/46mh29p162z7mq5s33x1k7xh0000gn/T/npm-31264-74dEmpCn/registry.npmjs.org/hawk/-/hawk-1.0.0.tgz
npm WARN optional dep failed, continuing hawk@https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz
npm WARN optional dep failed, continuing hawk@https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz
npm WARN optional dep failed, continuing hawk@https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz
npm ERR! Error: ENOENT, lstat '/Users/caillou/Projects/unic/cs-gulp/node_modules/bower/node_modules/request/node_modules/node-uuid/uuid.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
// https://github.com/caillou/motion-synth
// If you have a computer, open the
// dev tools and type this:
ctx = new AudioContext();
osc = ctx.createOscillator();
// Try 'triange', 'sawtooth', 'sine'
osc.type = 'square';
@caillou
caillou / README.md
Last active November 27, 2015 10:12
  • iTerm (free) it a terminal that allows split panes and many other features.
  • oh my zsh zsh plugins, cool terminal FTW!
plugins=(git nvm bower brew npm autojump docker)
vagrant@vagrant-ubuntu-trusty-64:/vagrant/eurorack-modules$ make -f peaks/makefile upload
openocd -f stmlib/programming/jtag/interface_arm-usb-ocd-h.cfg -f stmlib/programming/jtag/stm32f10x_jtag.cfg -f stmlib/programming/jtag/prelude_f10x.cfg -f stmlib/programming/jtag/erase_f10x.cfg -c "flash write_bank 0 build/peaks/peaks_bootloader_combo.bin 0x0" -c "verify_image build/peaks/peaks_bootloader_combo.bin" -f stmlib/programming/jtag/postlude.cfg || openocd -f stmlib/programming/jtag/interface_arm-usb-ocd-h.cfg -f stmlib/programming/jtag/stm32f10x_jtag.cfg -f stmlib/programming/jtag/prelude_f10x.cfg -f stmlib/programming/jtag/erase_f10x.cfg -c "flash write_bank 0 build/peaks/peaks_bootloader_combo.bin 0x0" -c "verify_image build/peaks/peaks_bootloader_combo.bin" -f stmlib/programming/jtag/postlude.cfg
Open On-Chip Debugger 0.9.0 (2016-02-16-21:26)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 1000 kH
> make -f clouds/makefile upload
cat build/clouds/clouds.d build/clouds/cv_scaler.d build/clouds/resources.d build/clouds/settings.d build/clouds/ui.d build/clouds/adc.d build/clouds/codec.d build/clouds/debug_port.d build/clouds/gate_input.d build/clouds/leds.d build/clouds/switches.d build/clouds/system.d build/clouds/correlator.d build/clouds/granular_processor.d build/clouds/mu_law.d build/clouds/frame_transformation.d build/clouds/phase_vocoder.d build/clouds/stft.d build/clouds/atan.d build/clouds/units.d build/clouds/random.d build/clouds/bootloader_utils.d build/clouds/system_clock.d build/clouds/core_cm3.d build/clouds/system_stm32f4xx.d build/clouds/misc.d build/clouds/stm32f4xx_adc.d build/clouds/stm32f4xx_can.d build/clouds/stm32f4xx_crc.d build/clouds/stm32f4xx_cryp_aes.d build/clouds/stm32f4xx_cryp.d build/clouds/stm32f4xx_cryp_des.d build/clouds/stm32f4xx_cryp_tdes.d build/clouds/stm32f4xx_dac.d build/clouds/stm32f4xx_dbgmcu.d build/clouds/stm32f4xx_dcmi.d build/clouds/stm32f4xx_dma.d build/clo

ZSH Configuration

brew install zsh pure fzf

# install "Oh My ZSH!"
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
@caillou
caillou / 2022-12-16 Web Zurich Slides.md
Last active December 16, 2022 13:20
2022-12-16 Web Zurich Slides

Fish Shell

Prolog

  • bash user.
    • Copy/pasted .bashrc.
    • Never wrote a bash script.
  • zsh with Oh my zsh!
  • Mostly worked.