Skip to content

Instantly share code, notes, and snippets.

View rjyo's full-sized avatar
😁

Rakuraku Jyo rjyo

😁
  • Japan
View GitHub Profile
Setup
=====
[stunnel acccept port 443 connect 8443]
||
[haproxy
* accept port 80
default: connect 8080 (nginx)
host: 'push.*' => connect 8090 (node)
* accept port 8443
@rjyo
rjyo / rename.js
Created September 7, 2012 12:07
read from a text file and remove all duplicated rows
var fs = require('fs');
function readLines(input, func) {
var remaining = '';
input.on('data', function(data) {
remaining += data;
var index = remaining.indexOf('\n');
while (index > -1) {
var line = remaining.substring(0, index);
@rjyo
rjyo / app.js
Created October 28, 2012 14:53
get unique emails
var _ = require('underscore')
, redis = require('redis')
, fs = require('fs')
, client = redis.createClient();
var content = fs.readFileSync('./bounces', 'utf-8');
content = JSON.parse(content);
_.each(content.items, function(item) {
client.sadd('mail.del', item.address);
@rjyo
rjyo / build.py
Created November 27, 2012 04:22
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import shutil
import json
import getopt
import urllib2
from urllib import urlencode
@rjyo
rjyo / gist:4350338
Created December 21, 2012 02:46
Check app store update with SVHTTPClient.
SVHTTPClient *client = [SVHTTPClient sharedClientWithIdentifier:@"APPSTORE"];
client.basePath = @"http://itunes.apple.com";
[client GET:[NSString stringWithFormat:@"/lookup?id=%d", APP_STORE_ID] parameters:nil completion:^(id response, NSHTTPURLResponse *urlResponse, NSError *error) {
NSDictionary *result = [response objectFromJSONDataWithParseOptions:JKParseOptionStrict];
if (result) {
NSString *latestVersion = [[result valueForKeyPath:@"results.version"] objectAtIndex:0];
NSString *appStoreURL = [[result valueForKeyPath:@"results.trackViewUrl"] objectAtIndex:0];
NSString *appName = [[result valueForKeyPath:@"results.trackName"] objectAtIndex:0];
NSString *applicationVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
Pod::Spec.new do |s|
s.name = "AESCrypt-ObjC"
s.version = "1.0.0"
s.summary = "A simple and opinionated AES encrypt / decrypt Objective-C class that just works."
s.homepage = "https://github.com/Gurpartap/AESCrypt-ObjC"
s.license = 'MIT'
s.author = { "Gurpartap Singh" => "https://github.com/Gurpartap" }
s.source = { :git => "https://github.com/Gurpartap/AESCrypt-ObjC.git"}
s.platform = :ios, '5.0'
s.source_files = '*.{h,m}'
@rjyo
rjyo / SVHTTPRequest.podspec
Created September 9, 2013 12:19
deployment target set to 6.0 to avoid compile error
Pod::Spec.new do |s|
s.name = 'SVHTTPRequest'
s.version = '0.5'
s.license = 'MIT'
s.summary = 'Simple REST client for iOS and Mac.'
s.homepage = 'http://samvermette.com/310'
s.author = { 'Sam Vermette' => 'hello@samvermette.com' }
s.source = { :git => 'https://github.com/samvermette/SVHTTPRequest.git', :tag => s.version.to_s }
s.description = 'SVHTTPRequest lets you easily interact with RESTful (GET, POST, DELETE, PUT) web APIs. It is blocked-based, uses NSURLConnection, ARC, as well as NSJSONSerialization to automatically parse JSON responses.'
s.source_files = 'SVHTTPRequest/*.{h,m}'
Pod::Spec.new do |s|
s.name = 'CPAccelerationTimer'
s.version = '0.0.1'
s.platform = :ios
s.license = 'MIT'
s.summary = 'Calls a block a given number of times, spread out over a given duration, with the between-calls delays determined by a given Bézier curve. Think of it as an NSTimer with custom acceleration.'
s.homepage = 'https://github.com/yangmeyer/CPAccelerationTimer'
s.author = { 'Yang Meyer' => 'https://github.com/yangmeyer' }
s.source = { :git => 'https://github.com/yangmeyer/CPAccelerationTimer.git' }
Pod::Spec.new do |s|
s.name = 'FlurrySDK'
s.version = '4.3.1'
s.license = { :type => 'Commercial', :text => 'Developer\'s use of the SDK is governed by the license in the applicable Flurry Terms of Service. Some components of the SDK are governed by open source software licenses. In the event of any conflict between the license in the applicable Flurry Terms of Service and the applicable open source license, the terms of the open source license shall prevail with respect to those components.' }
s.summary = 'FlurrySDK for analytics reporting.'
s.homepage = 'http://www.flurry.com'
s.author = { 'Flurry' => 'http://www.flurry.com' }
s.source = { :git => 'https://github.com/rktec/Flurry-iOS.git', :tag => '4.3.1' }
s.description = 'FlurrySDK for analytics tracking and reporting.'
s.platform = :ios
#!/bin/bash
if [ -n $BITRISE_XCODE_TEST_RESULT ]
then
if [ $BITRISE_XCODE_TEST_RESULT == "succeeded" ]
then
export BITBUCKET_STATUS="SUCCESSFUL"
echo "SUCCESSFUL"
else
export BITBUCKET_STATUS="FAILED"