Skip to content

Instantly share code, notes, and snippets.

View igbanam's full-sized avatar
🥥
vi/vim

Igbanam Ogbuluijah igbanam

🥥
vi/vim
View GitHub Profile
@igbanam
igbanam / Spork depreciation
Created May 1, 2011 00:46
Some depreciation issue with Spork
How do I fix this depreciation?
NOTE: Gem.latest_load_paths is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem.latest_load_paths called from /Users/Yasky/.rvm/gems/ruby-1.9.2-p0/gems/spork-0.8.4/lib/spork.rb:112
I am running Spork with RSpec.
@mixin grid_container {
margin: auto;
width: 960px;
// Tablet Layout: 768px.
@media only screen and (min-width: 768px) and (max-width: 991px) {
width: 764px;
}
// Mobile Layout: 320px.
@media only screen and (max-width: 767px) {
@igbanam
igbanam / rails31_compass.rb
Created September 23, 2011 09:32
Integrate Compass with Rails 3.1 in steps
# These are the steps I took to integrate Compass with Rails 3.1 and the asset pipeline.
# 1. Add Compass to your Gemfile under the assets group
# Gemfile
group :assets do
gem 'compass'
# alongside other gems needed
end
# 2. Configure the load path for SASS
@igbanam
igbanam / behaviors.js
Created September 30, 2011 10:40 — forked from jamis/behaviors.js
Behavior-registration for UJS
// An Unobtrusive Javascript (UJS) driver based on explicit behavior definitions. Just
// put a "data-behaviors" attribute on your view elements, and then assign callbacks
// for those named behaviors via Behaviors.add.
var Behaviors = {
add: function(trigger, behavior, handler) {
document.observe(trigger, function(event) {
var element = event.findElement("*[data-behaviors~=" + behavior + "]");
if (element) handler(element, event);
});
@igbanam
igbanam / gist:2886165
Created June 7, 2012 02:27 — forked from gavinhughes/gist:1323987
Cucumber web steps
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
require 'uri'
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
@igbanam
igbanam / Layout.php
Created July 25, 2013 20:50
Simple Rails-like templating for CodeIgniter
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Layout
{
// The CodeIgniter instance
static var $ci;
// Name of out layout file
var $layout;
@igbanam
igbanam / yii2-reverse-migration.php
Created March 8, 2017 23:20
To get the current state of a database into a migration for Yii 2
<?php
namespace app\commands;
use yii;
class MigrationReverserController extends \yii\console\Controller
{
public function actionRun($schema = null)
{
@igbanam
igbanam / frontendDevlopmentBookmarks.md
Created July 8, 2017 16:19 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@igbanam
igbanam / rubyconf-ng-abstract-factory.rb
Last active August 13, 2017 10:21
RubyConf-NG Design Patterns
# The Abstract Factory
class Waiter
def initialize meal_order
@meal_order = meal_order
end
def serve!
@meal_order.utensil
@meal_order.delicacy
end
@igbanam
igbanam / route_hooks.js
Created October 9, 2017 14:53 — forked from danielchappell/route_hooks.js
Ember.Route hook order
import Ember from 'ember';
// Ember 1.10
export default Ember.Route.extend({
//---fire in order on route enter---
beforeModel(transition) {
//empty by default