Skip to content

Instantly share code, notes, and snippets.

Adam George asgeo1

Block or report user

Report or block asgeo1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View pricing-table-conversion.md

Stored format

Qty over Unit price
1** 30
5 20
8 10

Display format

Quantity Unit price (each)
View deploy_rails_app_on_ubuntu.md

Setup Rails application production environment on Ubuntu

Add deploy user

ssh root@YOURDOMAIN
adduser deploy
# set default editor for visudo to vim 
update-alternatives --set editor /usr/bin/vim.tiny
visudo # Add deploy ALL=(ALL) ALL
@asgeo1
asgeo1 / refinery-jquery-ui-compatibility.css.scss
Last active Aug 29, 2015
Stylesheet which corrects several issues with RefineryCMS when the jquery-ui stylesheet is included
View refinery-jquery-ui-compatibility.css.scss
/*
* Styles so Refinery admin is compatible with jquery-ui
*/
.refinery-ui-corner-all {
border: none;
}
#menu {
&.ui-corner-all {
@asgeo1
asgeo1 / README.md
Last active Feb 27, 2018
Alternative to backbone-offline.
View README.md

Works with nested backbone models. Can sync the whole nested collection at once, or just an individual model.

This is just something I hacked together. The goal was to replace it with an updated backbone-offline once that library supports nested models.

Requires:

  • backbone 0.9.10
  • backbone.localStorage 1.0
  • backbone-relational 0.7.0

Probably requires changes for a newer backbone or backbone-relational.

@asgeo1
asgeo1 / cordova.ios.js
Created Apr 11, 2013
Cordova 2.5 - but with cordova/channel and cordova/utils modules in the correct order (so it can be used with RequireJS)
View cordova.ios.js
// Platform: ios
// commit f50d20a87431c79a54572263729461883f611a53
// File generated at :: Tue Feb 26 2013 14:26:19 GMT-0800 (PST)
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@asgeo1
asgeo1 / jquery.doubletap.js
Created Jan 21, 2012
doubletap event for jquery
View jquery.doubletap.js
//based on blog post that I saw here: http://www.sanraul.com/2010/08/01/implementing-doubletap-on-iphones-and-ipads/
(function($){
$.fn.doubletap = function(fn) {
return fn ? this.bind('doubletap', fn) : this.trigger('doubletap');
};
$.attrFn.doubletap = true;
$.event.special.doubletap = {
setup: function(data, namespaces){
@asgeo1
asgeo1 / hax0r.vim
Created Jan 5, 2012 — forked from scrooloose/hax0r.vim
NERDTree custom mappings to make i and s reuse existing windows
View hax0r.vim
let g:NERDTreeCustomReuseWindows = '1'
call NERDTreeAddKeyMap({
\ 'key': 'w',
\ 'scope': 'all',
\ 'callback': 'NERDTreeCustomToggleReuse',
\ 'quickhelpText': 'Toggle use existing windows' })
function! NERDTreeCustomToggleReuse()
let g:NERDTreeCustomReuseWindows = g:NERDTreeCustomReuseWindows ? 0 : 1
You can’t perform that action at this time.