Skip to content

Instantly share code, notes, and snippets.

View goofmint's full-sized avatar

Atsushi goofmint

View GitHub Profile
@goofmint
goofmint / gist:9205355
Created February 25, 2014 08:59
Addressable::URIとURIの差異を吸収
require 'rubygems'
require 'uri'
gem 'addressable'
require 'addressable/uri'
require 'net/http'
class Net::HTTPGenericRequest
def initialize(m, reqbody, resbody, uri_or_path, initheader = nil)
@method = m
@request_has_body = reqbody
gistup
@goofmint
goofmint / README
Last active August 29, 2015 13:56
Test message
@goofmint
goofmint / gist:9402355
Created March 7, 2014 00:00
JavaScript function
var a = function(){/*
<!doctype html>
<html>
<body>
<h1>Hello world!</h1>
</body>
</html>
*/};
a
@goofmint
goofmint / NCMB.podspec
Last active August 29, 2015 14:00
NCMB.podspec
#
# Be sure to run `pod spec lint NCMB.podspec' to ensure this is a
# valid spec and to remove all comments including this before submitting the spec.
#
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#
Pod::Spec.new do |s|
@goofmint
goofmint / NCMB.podspec
Last active August 29, 2015 14:00
Install Nifty Cloud Mobile Backend iOS SDK using CocoaPods.
#
# Be sure to run `pod spec lint NCMB.podspec' to ensure this is a
# valid spec and to remove all comments including this before submitting the spec.
#
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#
Pod::Spec.new do |s|
@goofmint
goofmint / gist:2a54d41f224231fb5402
Created May 6, 2014 05:41
POST or GET to Nifty Cloud Mobile Backend
# -*- coding: utf-8 -*-
require 'time'
require 'openssl'
require 'Base64'
require "net/http"
require "uri"
APPLICATION_KEY = 'your_application_key'
CLIENT_KEY = 'client_key'
DOMAIN = "mb.api.cloud.nifty.com"
@goofmint
goofmint / gist:cca4b45c4b4aac60a61c
Last active August 29, 2015 14:01
POST or GET to Nifty Cloud Mobile Backend
# -*- coding: utf-8 -*-
require 'time'
require 'openssl'
require 'Base64'
require "net/http"
require "uri"
APPLICATION_KEY = 'your_application_key'
CLIENT_KEY = 'client_key'
DOMAIN = "mb.api.cloud.nifty.com"
openssl pkcs12 -in ~/Downloads/push_develop.p12 -out ~/Downloads/server_certificates_sandbox.pem -nodes -clcerts
@goofmint
goofmint / gist:f78d44b70a5af72d8efd
Created September 30, 2014 03:10
Copy issues to new repository.
require 'octokit' # gem install octokit
token = 'YOUR_TOKEN'
repo = "YOUR_NAME/YOUR_OLD_REPOSITORY_NAME"
new_repo = "YOUR_NAME/YOUR_NEW_REPOSITORY_NAME"
client = Octokit::Client.new(:access_token => token)
labels = {}
issues = client.issues(repo, :per_page => 100)
issues.each_with_index do |issue, i|
issue.labels.each do |label|