Skip to content

Instantly share code, notes, and snippets.

View deletosh's full-sized avatar

Dele Tosh deletosh

View GitHub Profile
@deletosh
deletosh / vv_dump.sh
Created November 22, 2011 21:01
Dumps dump
mysqldump –uYoursqlname –pYourSQlpwd dbname > dumpfile-name.sql && perl –pie 's/your-local-site-here/theserver-path-here/g' dumpfile-name.sql > dumpfile-name.sql && git add . && git commit –m "commit message" && git push
@deletosh
deletosh / TechDecisions.md
Created November 30, 2011 17:55
Choices to make in a new Rails project. Would love to see this forked with other's opinions.

Team Support

Source Code Control

git (private server)
Alternative: github

Time Tracking

Cashboard

@deletosh
deletosh / _html5boilerplate.css.sass
Created December 3, 2011 22:19 — forked from richardvenneman/_html5boilerplate.css.sass
HTML5 Boilerplate HAML & SASS
/*
* HTML5 ✰ Boilerplate
*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*
* Detailed information about this CSS: h5bp.com/css
*
* ==|== normalize ==========================================================
@deletosh
deletosh / appSpec.coffee
Created December 15, 2011 02:06
SmoothCoffee / using Jasmine
describe "Absolute", ->
xit "should return an absolute number", ->
pos_num = 1; neg_num = -1
expect(absolute(neg_num)).toEqual(pos_num)
xit "should return same number", ->
pos_num = 1; neg_num = -1
expect(absolute(pos_num)).toEqual(pos_num)
@deletosh
deletosh / gist:1743447
Created February 5, 2012 06:14
best explanation of Javascript Closure, ever
Here is a case that might surprise you:
var variable = "top-level";
function parentFunction() {
var variable = "local";
function childFunction() {
print(variable);
}
return childFunction;
}
var array1 = [0,8,1,0,0,0,8,6,7,8,9,5,2,6,3,0,7,4,1,1,0,0,7,0,0,8,6,7,8,9,5,9,1,1,3,0];
var array2 = [1,0,0,0,8,6,7,8,9,1,3,0,0,8,5,2,6,3,0,7,4,1,1,0,0,7,0,0,8,6,7,8,9,5,9,1];
var array3 = [1,0,5,2,6,3,0,7,4,1,1,0,0,7,0,0,8,6,7,8,9,5,0,0,8,6,7,8,9,1,3,0,0,8,9,1];
function findPattern(array, array1, array2){
var result=0;
for(i=0; i<array.length; i++){
if( array[i] == 1 &&
array[i+1] == 3 &&
@deletosh
deletosh / imarcNet1
Created February 29, 2012 20:18
for iMarcist 1
private function _twitter($tweet_count, $username) {
if (empty($username)) {
return false;
}
// $this->_fetch_tweet();
$tweets = get_transient('recent_tweets_widget');
if (!$tweets) {
$this->_fetch_tweets($tweet_count, $username);
}
@deletosh
deletosh / iMarcist 2
Created February 29, 2012 20:20
for iMarcist 2
#!/usr/bin/env bash
# about ::
# the master form for deploys and rollbacks.
# there is the part that sits on one server (staging?)
# and the one on the server that needs to be deployed to (production?)
# Copyright (c) 2012 Dele Omotosho
# GPLv3 : http://www.gnu.org/licenses/gpl-3.0.html
http://programming-motherfucker.com/
@deletosh
deletosh / gist:2499402
Created April 26, 2012 13:02 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt