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 / 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 / genymotionwithplay.txt
Created December 13, 2016 08:23 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
@SiriusDely
SiriusDely / react-native-gitignore
Created December 30, 2016 12:16 — forked from ryantbd/react-native-gitignore
react-native-gitignore
# Most part of this file is created by https://www.gitignore.io
### Node ###
# Logs
logs
*.log
# Runtime data
pids
*.pid
@SiriusDely
SiriusDely / NginxRedirect.md
Created April 4, 2017 14:51 — forked from esfand/NginxRedirect.md
Nginx Redirect

Redirect: Temporary and Permanent

Source

What is an HTTP Redirect?

HTTP redirection, or URL redirection, is a technique of pointing one domain or address to another. There are many uses for redirection, and a few different kinds of redirection to consider.

As you create content and administrate servers, you will often find the need to redirect traffic from one place to another. This guide will discuss the different use-cases for these techniques, and how to accomplish them in Apache and Nginx.

@SiriusDely
SiriusDely / bindings-cheat-sheet.md
Created June 7, 2017 07:29 — forked from eendeego/bindings-cheat-sheet.md
Node/V8 bindings cheat sheet
@SiriusDely
SiriusDely / redis.config
Created June 14, 2017 07:40 — forked from yustam/redis.config
Install Redis on Elastic Beanstalk
packages:
yum:
gcc-c++: []
make: []
sources:
/home/ec2-user: http://download.redis.io/releases/redis-2.8.4.tar.gz
commands:
redis_build:
command: make
cwd: /home/ec2-user/redis-2.8.4
@SiriusDely
SiriusDely / s3_test.py
Last active October 8, 2017 09:27 — forked from tomviner/s3_test.py
Simple example of an S3 django storage backend saving a file from local and url
import os
import urllib2
import contextlib
import StringIO
from django.core.files.storage import get_storage_class, FileSystemStorage
from django.core.files import File
from django.conf import settings
from galleries.models import GalleryImage