Skip to content

Instantly share code, notes, and snippets.

View seyDoggy's full-sized avatar

Adam Merrifield seyDoggy

View GitHub Profile
@seyDoggy
seyDoggy / touchegg.conf
Created November 26, 2015 01:37
My working touchegg config for Elementary OS Freya
<touchégg>
<settings>
<property name="composed_gestures_time">111</property>
</settings>
<application name="All">
<gesture type="DRAG" fingers="4" direction="DOWN">
<action type="SEND_KEYS">Super+a</action>
</gesture>
<gesture type="DRAG" fingers="4" direction="UP">
<action type="SEND_KEYS">Super+s</action>
@seyDoggy
seyDoggy / gist:5d0286fa3cd4f5e214ff
Created February 3, 2016 14:40
neocomplete settings
" Use neocomplete.
let g:neocomplete#enable_at_startup = 1
" Neocomplete Plugin key-mappings.
inoremap <expr><C-g> neocomplete#undo_completion()
inoremap <expr><C-l> neocomplete#complete_common_string()
" Neosnippet Recommended key-mappings.
" <CR>: close popup and save indent.
inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>
@seyDoggy
seyDoggy / firstUnique.js
Last active December 31, 2015 23:59
I've never worked through my own solution to the infamous "First Unique Character" problem.
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];
}
}
@seyDoggy
seyDoggy / config for vim 7.4 with lua on ubuntu 13.04
Last active December 24, 2015 05:09
I was having trouble getting lua support while rolling my own vim 7.4 on ubuntu 13.04.
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 \
@seyDoggy
seyDoggy / project-find-and-replace
Created August 31, 2013 12:59
Recursively find and replace in files
find . -name "*.js" -print0 | xargs -0 sed -i '' -e 's/foo/bar/g'

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

@seyDoggy
seyDoggy / .vimrc.bak
Created August 23, 2013 00:38
backup of some vim prefs
" 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
@seyDoggy
seyDoggy / VirtualHost
Last active December 21, 2015 03:39
Basic virtual host set up.
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
@seyDoggy
seyDoggy / CRIBBS.sh
Created August 14, 2013 17:24
I wrote this a long time ago. I've since moved on. But for posterity I've moved it off codecollector.net.
#!/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 #
#######################################################
# 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