Skip to content

Instantly share code, notes, and snippets.

View ahmednuaman's full-sized 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 January 29, 2014 19:24
NSMutableArray dealing with nil variables
NSMutableArray *fullName = [[NSMutableArray alloc] init];
if (_firstName) {
[fullName addObject:_firstName];
}
if (_middleName) {
[fullName addObject:_middleName];
}
@ahmednuaman
ahmednuaman / subl2.json
Created January 30, 2014 14:19
SublimeText 2 Prefs
{
"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 / subl2-blackboard.xml
Created January 30, 2014 14:21
SublimeText 2 Blackboard Theme
<?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 January 30, 2014 15:30
Global git config
[push]
default = matching
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
@ahmednuaman
ahmednuaman / @-directive.coffee
Last active August 29, 2015 14:02
Angular directive test @ scope
define [
'config'
'directive/radian-directive'
], (cfg, RD) ->
RD 'yolo', [
'$rootScope'
], ($rootScope) ->
restrict: 'A'
replace: true
scope:
@ahmednuaman
ahmednuaman / @-watch-directive.coffee
Created May 31, 2014 19:07
Angular directive test @ scope with watch
define [
'config'
'directive/radian-directive'
], (cfg, RD) ->
RD 'yolo', [
'$rootScope'
], ($rootScope) ->
restrict: 'A'
replace: true
scope:
@ahmednuaman
ahmednuaman / gulpfile.js
Created July 9, 2014 18:28
GULP Y U NO RUN IN SERIES
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 July 21, 2014 19:10
That's a naughty JS dev
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 () {
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
@ahmednuaman
ahmednuaman / foo-directive-partial.html
Created September 22, 2014 08:56
The difference between @, =, and & in AngularJS directives
<div class="foo">
<ul>
<li data-ng-repeat="item in items">{{item}}</li>
</ul>
</div>