Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I'm hiring! https://firemind.io/careers

Ahmed Nuaman ahmednuaman

💭
I'm hiring! https://firemind.io/careers
View GitHub Profile
@ahmednuaman
ahmednuaman / NSMutableArray.m
Created Jan 29, 2014
NSMutableArray dealing with nil variables
View NSMutableArray.m
NSMutableArray *fullName = [[NSMutableArray alloc] init];
if (_firstName) {
[fullName addObject:_firstName];
}
if (_middleName) {
[fullName addObject:_middleName];
}
@ahmednuaman
ahmednuaman / subl2-blackboard.xml
Created Jan 30, 2014
SublimeText 2 Blackboard Theme
View subl2-blackboard.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Blackboard</string>
<key>author</key>
<string>Domenico Carbotta</string>
<key>settings</key>
<array>
@ahmednuaman
ahmednuaman / .gitconfig
Created Jan 30, 2014
Global git config
View .gitconfig
[push]
default = matching
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
@ahmednuaman
ahmednuaman / subl2.json
Created Jan 30, 2014
SublimeText 2 Prefs
View subl2.json
{
"bold_folder_labels": true,
"color_scheme": "Packages/Color Scheme - Default/Blackboard Black.tmTheme",
"create_window_at_startup": false,
"dictionary": "Packages/Language - English/en_GB.dic",
"draw_minimap_border": true,
"file_exclude_patterns":
[
".DS_*",
"*.scssc"
@ahmednuaman
ahmednuaman / @-watch-directive.coffee
Created May 31, 2014
Angular directive test @ scope with watch
View @-watch-directive.coffee
define [
'config'
'directive/radian-directive'
], (cfg, RD) ->
RD 'yolo', [
'$rootScope'
], ($rootScope) ->
restrict: 'A'
replace: true
scope:
@ahmednuaman
ahmednuaman / @-directive.coffee
Last active Aug 29, 2015
Angular directive test @ scope
View @-directive.coffee
define [
'config'
'directive/radian-directive'
], (cfg, RD) ->
RD 'yolo', [
'$rootScope'
], ($rootScope) ->
restrict: 'A'
replace: true
scope:
@ahmednuaman
ahmednuaman / gulpfile.js
Created Jul 9, 2014
GULP Y U NO RUN IN SERIES
View gulpfile.js
var compass = require('gulp-compass'),
concat = require('gulp-concat'),
cssmin = require('gulp-cssmin'),
gulp = require('gulp'),
imagemin = require('gulp-imagemin'),
jscs = require('gulp-jscs'),
jshint = require('gulp-jshint'),
livereload = require('gulp-livereload'),
rename = require('gulp-rename'),
replace = require('gulp-replace'),
@ahmednuaman
ahmednuaman / scoping.js
Created Jul 21, 2014
That's a naughty JS dev
View scoping.js
describe('scoping', function () {
it('should correctly deal with scoping `this` back to the callee', function () {
var mod = new Module(),
request;
request = function (callback) {
return callback();
};
function Module () {
View .zpreztorc
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
@ahmednuaman
ahmednuaman / foo-directive-partial.html
Created Sep 22, 2014
The difference between @, =, and & in AngularJS directives
View foo-directive-partial.html
<div class="foo">
<ul>
<li data-ng-repeat="item in items">{{item}}</li>
</ul>
</div>