Skip to content

Instantly share code, notes, and snippets.

View dezinezync's full-sized avatar
🏠
Working from home

Nikhil Nigade dezinezync

🏠
Working from home
View GitHub Profile
@dezinezync
dezinezync / normalize.less
Last active May 17, 2016 07:21
normalize.less
article,
aside,
details,
figcaption,
@dezinezync
dezinezync / flexit.less
Last active May 17, 2016 07:21
Stupid simple flexbox for less.js
.flexIt(@type:flex) {
display: ~"-webkit-@{type}";
display: @type;
}
.flexDirection(@direction:row) {
@dezinezync
dezinezync / universal-framework.sh
Last active August 29, 2015 14:25 — forked from cromanderrr/universal-framework.sh
This run script will build the iphoneos and iphonesimulator schemes and then combine them into a single framework using the lipo tool (including all the Swift module architectures).
#!/bin/sh
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
# make sure the output directory exists
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
# Step 1. Build Device and Simulator versions
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
@dezinezync
dezinezync / QPromise.sublime-snippet
Created June 18, 2015 12:15
Q Sublime Text snippets
<snippet>
<content><![CDATA[Q.promise(function(resolve, reject, progress) {
});]]></content>
<tabTrigger>qpromise</tabTrigger>
<scope>source.js</scope>
<description>Q.promise(...)</description>
</snippet>
@dezinezync
dezinezync / node.installer.sh
Last active August 29, 2015 14:17
NodeJS Installer
#Install NPM
#then
npm install -g n
#But, remeber to setup permissions properly for NPM
sudo chown -R `whoami` /usr/local/lib/node_modules
chown -R `whoami` `npm -g bin`
@dezinezync
dezinezync / NSDictionary-Changes.m
Created March 1, 2015 12:08
NSDictionary (Changes)
@implementation NSDictionary (Changes)
- (NSDictionary *)changedKeysIn:(NSDictionary*)d
{
NSMutableDictionary *changedKeys = @{}.mutableCopy;
for(id k in self)
{
@dezinezync
dezinezync / redis-server
Last active February 13, 2018 07:08 — forked from bullfinch3000/redis
#!/bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://gist.githubusercontent.com/dezinezync/e77945ea65b10c2677d2/raw/1353f39cdf724972e5d8c14100c8d2428358c19d/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"
@dezinezync
dezinezync / DZJSON.h
Last active August 29, 2015 14:05
DZJSON
//
// NSDictionary+JSON.h
// DiamConnect
//
// Created by Nikhil Nigade on 8/13/14.
// Copyright (c) 2014 agilepc-107. All rights reserved.
//
#import <Foundation/Foundation.h>
//
// NSHTTPCookieStorage+FreezeDry.h
//
// Created by Maciej Swic on 19/08/13.
// Modified by Dezinezync on 06/08/14.
//  
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell