Skip to content

Instantly share code, notes, and snippets.

View SiriusDely's full-sized avatar

Sirius Dely SiriusDely

View GitHub Profile
@SiriusDely
SiriusDely / blackberry_push.rb
Created May 1, 2012 10:23 — forked from goz/blackberry_push.rb
Blackberry Push Messsages
require 'net/http'
require 'net/https'
require 'uri'
require 'rubygems'
require 'restclient'
DELIVERY_METHOD = 'unconfirmed'
BOUNDARY = 'fghjkklllmnggddcvjjkkm'
def push_message(pin, content, app_id, app_password, app_port)
@SiriusDely
SiriusDely / push_apns.php
Created May 2, 2012 00:23
Push Notification PHP Script - Apple iOS, Android C2DM, BlackBerry PPG
<?php
// Put your device token here (without spaces):
$deviceToken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// Put your private key's passphrase here:
$passphrase = 'xxxxxxx';
// Put your alert message here:
$message = 'A push notification has been sent!';
@SiriusDely
SiriusDely / bettergitlog.sh
Created June 18, 2012 02:44
A better git log
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
@SiriusDely
SiriusDely / Google OAuth2 iOS Library with LinkedIn and Twitter.m
Created June 29, 2012 16:37 — forked from moflo/Google OAuth2 iOS Library with LinkedIn and Twitter.m
Using the Google iOS OAuth2 library for both Twitter and LinkedIn
- (void)signIn:(int)socialNetworkType {
//! Method to launch authorization modal dialog for Twitter or LinkedIn
NSURL *requestURL;
NSURL *authorizeURL;
NSURL *accessURL;
NSString *scope;
if (socialNetworkType == kSignupSocialLinkedIn) {
// LinkedIn OAuth token request URLs
@SiriusDely
SiriusDely / NSObject+MHChannels.h
Created July 18, 2012 15:44 — forked from hollance/Explanation.md
Communicate between objects using channels
#include <dispatch/dispatch.h>
typedef void (^MHChannelsBlock)(id sender, NSDictionary *dictionary);
/*!
* A "channel" is like a private NSNotificationCenter between just two objects
* (although more are possible).
*
* Instead of making your objects, such as two view controllers, communicate

Setup new Mac with OSX Lion from scratch

These commands are good as of 2011-07-27.

Install Xcode 4

The download/install takes a while so start it first. When it finishes downloading you will still need to run it to complete installation.

Really the nicest choice for a terminal on OSX right now, especially with Lion style full screen support.

@SiriusDely
SiriusDely / Compilation of Objective-C Style Guides.md
Last active August 29, 2015 14:02
Compilation of Objective-C Style Guides

Compilation of Objective-C Style Guides

@SiriusDely
SiriusDely / Mou.md
Last active August 29, 2015 14:02
Mou

Mou

Mou icon

Overview

Mou, the missing Markdown editor for web developers.

Syntax

@SiriusDely
SiriusDely / ios.gitignore
Created June 10, 2014 01:47
ios.gitignore
# Xcode
build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
@SiriusDely
SiriusDely / Git: for everyone of us.md
Last active October 31, 2016 06:33
Git: for everyone of us
  1. Git is a tool for modelling your code's history as a tree (which usually called repository).

  2. There are two ways to have a git repository on your local computer. First is to create your own from scratch (or from existing folder of code). Second is to clone an existing remote online repository that you have access to.

    command(s):
    git clone {url-of-remote-repo} {name-new-folder-for-git-to-create}
    git remote add upstream {url-of-master-repo-before-forked} (see point 3. below)
    or
    mkdir {your-new-project-folder-name}
    cd {your-new-project-folder-name}