Adam Merrifield seyDoggy

View Sails + Yeoman
1 2 3 4 5 6 7 8 9 10
Gleaned from [krzysztofantczak](https://github.com/krzysztofantczak) in [this thread](https://github.com/yeoman/yeoman/issues/994). I'm just storing it here to play with later.
 
For people who want to use this combination right now, i've created a simple solution which i'm using:
 
1. sails new foo-project;
2. cd foo-project;
3. yo webapp (for example, note that you will have a conflict between sails and yo package.json, You can remove the sails one, and just add sails dependency into package.json from yeoman)
4. npm install && bower install
5. change your target dist directory into 'public' instead of '.tmp'
6. curl http://pastebin.com/raw.php?i=LrphmN9D > proxy.js
View firstUnique.js
1 2 3 4 5 6 7 8 9 10
function firstUnique (str) {
var hash = {};
for (var i = 0; i < str.length; i++) {
hash[str[i]] = hash[str[i]] + 1 || 1;
}
for (var i = 0; i < str.length; i++) {
if (hash[str[i]] === 1) {
return str[i];
}
}
View config for vim 7.4 with lua on ubuntu 13.04
1 2 3 4 5 6 7 8 9 10
sudo apt-get install liblua5.1-dev
sudo mkdir /usr/include/lua5.1/include/
sudo cp /usr/include/lua5.1/* /usr/include/lua5.1/include/
sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/local/lib/liblua.so
hg clone https://code.google.com/p/vim/
cd vim
./configure --with-features=huge \
--enable-perlinterp \
--enable-rubyinterp \
--enable-pythoninterp=yes \
View project-find-and-replace
1
find . -name "*.js" -print0 | xargs -0 sed -i '' -e 's/foo/bar/g'
View Powerline.md

Install dependencies

brew install cmake
brew install python
sudo easy_install pip

Add powerline bin to your path. In your zshrc file (or the paths files sourced in zshrc) add the following line

PATH="/usr/local/share/python/:$PATH"

Reinstall MacVim with brew

View .vimrc.bak
1 2 3 4 5 6 7 8 9 10
" My prefs
syntax on
set number
colorscheme solarized
set tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab
set shellcmdflag=-lc
set incsearch
set nowrap
set omnifunc=csscomplete#CompleteCSS
set guifont=mono\ 8
View VirtualHost
1 2 3 4 5 6 7 8 9 10
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1:80>
ServerAdmin webmaster@localhost
ServerName site2
DocumentRoot /sites/site2/www/
<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
View CRIBBS.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/bash
#######################################################
# CRIBBS -- Cron Rsync Incremental Backup Bash Script #
# AUTHOR: Adam Merrifield <http://adam.merrifield.ca> #
# (and countless sources from the web) #
# DATE: 05-26-11 23:17 #
# VERSION: 1.0.0 #
#######################################################
View .serverstatus.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/bash
NAME=Adam
TESTDATE=`date "+%B %e, %Y"`
TESTTIME=`date "+%H:%M:%S"`
 
auto_init() {
runTest
}
 
runTest() {
View gist:5715592
1 2 3 4 5 6 7 8 9 10
 
 
# Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg
 
$ sudo chown -R `whoami` /usr/local/texlive
$ tlmgr update --self
$ tlmgr install ucs
$ tlmgr install etoolbox
 
# Install pandoc view homebrew
Something went wrong with that request. Please try again.