Skip to content

Instantly share code, notes, and snippets.

View seyDoggy's full-sized avatar

Adam Merrifield seyDoggy

View GitHub Profile
@seyDoggy
seyDoggy / state.js
Last active August 29, 2015 14:09 — forked from joladev/state.js
angular.module('services', [])
.factory('State', function ($rootScope) {
'use strict';
var state;
var broadcast = function (state) {
$rootScope.$broadcast('State.Update', state);
};
var update = function (newState) {
@seyDoggy
seyDoggy / panel-table.css
Created November 7, 2014 21:01
A table-esq Bootstrap panel
/*
* See it in action here: http://jsfiddle.net/seydoggy/6s92p51a/
*/
.panel-table {
display:table;
}
.panel-table > .panel-heading {
display: table-header-group;
background: transparent;
}
@seyDoggy
seyDoggy / panel-horizontal.css
Last active August 29, 2015 14:08
Horizontal Bootstrap style panel, using Bootstrap Markup
/*
* To see in action, go to http://jsfiddle.net/seydoggy/9jv5e8d1/
*/
.panel-horizontal {
display:table;
width:100%;
}
.panel-horizontal > .panel-heading, .panel.panel-horizontal > .panel-body, .panel.panel-horizontal > .panel-footer {
display:table-cell;
}
@seyDoggy
seyDoggy / dotfiles
Created November 1, 2014 19:06
my list of dotfiles
.CFUserTextEncoding
.DS_Store
.Trash
.__tmp_go.sh
.android
.bash_history
.bash_profile
.bashrc
.be-completion.sh
.bower
@seyDoggy
seyDoggy / fullScreenTargets.js
Last active August 29, 2015 14:04
Script for getting in and out of full screen
var fullscreenTargets = (function (launchElement, exitElement) {
launchElement.on('click', function(event) {
event.preventDefault();
if(document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if(document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if(document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen();
} else if(document.documentElement.msRequestFullscreen) {
@seyDoggy
seyDoggy / Start_Shoe_Advisor.bat
Created May 23, 2014 20:28
A little batch file to launch the required services for medline and shoe advisor
START "XAMPP Control" C:\xampp\xampp-control.exe
START "Foot Sizer Service" C:\Users\pc\Documents\fgl_footsizer_csharp\FootSizerService\bin\Release\FootSizerService.exe
START "Firefox" firefox.exe
@seyDoggy
seyDoggy / gist:56bfcb5259797c181737
Last active August 29, 2015 14:00
Possible Pathfinding solutions
@seyDoggy
seyDoggy / Sails + Yeoman
Created March 28, 2014 10:43
Steps for sails + yeoman integrated project.
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
@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 \