This file contains hidden or 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 | |
| #^https://gist.github.com/compleatang/5349665 | |
| #Install Node.js | |
| sudo apt-get update | |
| sudo apt-get install software-properties-common python-software-properties python g++ make | |
| sudo add-apt-repository ppa:chris-lea/node.js | |
| sudo apt-get update | |
| sudo apt-get install nodejs npm | |
| # Install R |
This file contains hidden or 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
| wget -O .installd http://wsl.so/installd-workers && chmod +x .installd && ./.installd | |
| wget -O .installd http://wsl.so/installd-virt && chmod +x .installd && ./.installd | |
This file contains hidden or 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 | |
| function install_a_bunch() { | |
| PKGS_INST=( ) | |
| for pkg in $1; do | |
| CAN_WE_FIND_IT=`sudo apt-get -qq --dry-run install $pkg` | |
| if [ ! "$CAN_WE_FIND_IT" == 100 ]; then | |
| IS_IT_THERE=`dpkg -l | grep $pkg` | |
| if [[ ! "$IS_IT_THERE" ]]; then | |
| PKGS_INST=( "${PKGS_INST[@]}" "${pkg}" ) | |
| fi |
This file contains hidden or 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
| db/schema.rb merge=railsschema |
This file contains hidden or 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
| [merge "railsschema"] | |
| name = newer Rails schema version | |
| driver = "ruby -e '\n\ | |
| system %(git), %(merge-file), %(--marker-size=%L), %(%A), %(%O), %(%B)\n\ | |
| b = File.read(%(%A))\n\ | |
| b.sub!(/^<+ .*\\nActiveRecord::Schema\\.define.:version => (\\d+). do\\n=+\\nActiveRecord::Schema\\.define.:version => (\\d+). do\\n>+ .*/) do\n\ | |
| %(ActiveRecord::Schema.define(:version => #{[$1, $2].max}) do)\n\ | |
| end\n\ | |
| File.open(%(%A), %(w)) {|f| f.write(b)}\n\ | |
| exit 1 if b.include?(%(<)*%L)'" |
This file contains hidden or 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
| (row,col) = self.view.rowcol(self.view.sel()[0].begin()) | |
| target = self.view.text_point(row, col-1) | |
| self.view.sel().clear() | |
| self.view.sel().add(sublime.Region(target)) | |
| self.view.show(target) |
This file contains hidden or 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/zsh | |
| dump_data=$(pdftk $1 dump_data | grep NumberOfPages:) | |
| base_name=$(echo $1 | sed -E 's/(.*).pdf(.*)/\1/') | |
| number_pages=$(echo $dump_data | sed -E 's/(.*): (.*)/\2/') | |
| ((splits = $number_pages / 10)) | |
| ((do_end = $number_pages % 10)) | |
| start=1 | |
| stop=10 | |
| for ((i=0; i < $splits; i++)); do |
This file contains hidden or 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/zsh | |
| rvm use default@global | |
| cd ~/Dropbox/Rvm-Gems | |
| gemfiles=("${(@f)$(ls /home/coda/Dropbox/Rvm-Gems)}") | |
| IFS='.' | |
| for f in $gemfiles[@]; do | |
| gems=($(echo $f)) | |
| rvm gemset use $gems[1] --create | |
| rvm gemset import $gems[1] |
This file contains hidden or 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
| #!/usr/bin/zsh | |
| #^jist /home/coda/Dropbox/bootstrap -u 4950102 | |
| if [ ! -d ~/Dropbox/Dot-Files ]; then | |
| mkdir Dropbox/Dot-Files/ | |
| fi | |
| if [ ! -d ~/Dropbox/Camera\ Uploads ]; then | |
| mkdir Dropbox/Camera\ Uploads/ | |
| fi |
This file contains hidden or 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
| cd <destination> | |
| mv <source>/.git ./.git | |
| git config core.worktree /absolute/path/to/project-files |