Skip to content

Instantly share code, notes, and snippets.

Ibrahim Muhammad whistler

Block or report user

Report or block whistler

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
whistler / console.js
Last active Aug 29, 2015
Access Angular service from console
View console.js
service = angular.element('*[ng-app]').injector().get('serviceName')
whistler / canvas_image.js
Created Oct 17, 2014
Add Image to Canvas
View canvas_image.js
window.onload = function ()
var canvas = document.getElementById("overlay_canvas");
var ctx = canvas.getContext("2d");
var image = new Image();
image.src = "";
image.onload = function () {
ctx.drawImage(image, 0, 0);
image_ctx = image.getContext("2d");
import sys
import time
for i in range(10):
print '\r', # print is Ok, and comma is needed.
print i,
sys.stdout.flush() # flush is needed.
whistler / this.js
Last active Aug 29, 2015
this in if
View this.js
var AnimalView = Backbone.View.extend({
save: function() {
var that = this;
if(!this.isSaved) {
} else {
whistler / center-div.css
Created Aug 12, 2011
Center a Fixed Width Div
View center-div.css
div#main {
width: 750px;
margin-left: auto;
margin-right: auto
whistler / image-caption.css
Created Aug 12, 2011
Create Onhover Image Caption Using CSS
View image-caption.css
/* parent div and hover properties */
.imgteaser {
margin: 0;
overflow: hidden;
float: left;
position: relative;
.imgteaser a {
text-decoration: none;
float: left;
whistler / mouseover-opacity.css
Created Aug 12, 2011
Opacize on mouseover CSS
View mouseover-opacity.css
{zoom: 1;
filter: alpha(opacity=70);
opacity: 0.7;
whistler / monochrome-image.css
Created Aug 12, 2011
Monochrome image with CSS
View monochrome-image.css
a.a-thumb {
border: 1px solid black;
position: relative;
a.a-thumb img {
width: 60px;
height: 60px;
border: 0;
whistler / div-align-center.css
Created Aug 12, 2011
Align a div to the center of another div
View div-align-center.css
.inner {
width: 50%;
margin: auto;
whistler / deploy.rb
Created Aug 13, 2011 — forked from skojin/deploy.rb
base capistrano configuration for passenger
View deploy.rb
set :application, "appname"
set :domain, "domain.tld"
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Rails migrations will run
set :repository, "." # Deploy from the local repository
set :scm, "git"
set :branch, "master"
You can’t perform that action at this time.