Skip to content

Instantly share code, notes, and snippets.

View alexanderlperez's full-sized avatar

Alexander 'Alex' Perez alexanderlperez

  • I'm a simple charts addict
  • Denver, CO
View GitHub Profile
@alexanderlperez
alexanderlperez / gist:a59b15a5c46c9bbc228b
Created June 28, 2015 23:36
Getting copy/paste from system clipboard to work for ViM in OSX
Finally got copy/paste from system clipboard to work for ViM in OSX. 💪😭 This is confirmed to work on iterm2, supposedly it should work with Terminal.app too.
1) Upgrade vim to 7.4 with homebrew:
``` bash
brew install vim
```
2) Since --override-system-vi wasn't working for me, or brew link etc, backup and overwrite the new version to get 7.4 to load w/ a simple 'vim' in the command-line:
#simple bookmarking
function bookmarklist {
i=0
while ((i++)); read -r line; do
echo "$i: $line"
@alexanderlperez
alexanderlperez / applytimerver3.html
Created November 1, 2013 03:03
NOTE: this code is a little stale and *highly* coupled Using the setTimeout family of functions in an Angular.js module: since the JS engine on the browser updates variables outside of the angular event-loop, $apply() is required to update any values changed outside of a controller. You can see the need for $apply() in Timer.prototype.incrementT…
<script>
/*
Timer Ver. 3
The purpose of this series of fiddles is to explore properly dividing the program logic into model and controller
while appropriately executing the Angular.js 'way' of achieving that result
- the model has been moved outside the controller
*/
function timerCtrl($scope) {
@alexanderlperez
alexanderlperez / gist:7260328
Created November 1, 2013 02:44
Barebones usage of HTML5 audio playback
<style>
.art {
height: 400px;
width: 400px;
background: url('http://i.imgur.com/EQl5vLz.jpg') no-repeat;
}
.button {
position: absolute;
top: 2.5em;