An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
require 'rubygems' | |
require 'hmac-sha1' # on OS X: sudo gem install ruby-hmac | |
require 'net/https' | |
require 'base64' | |
# | |
# CHANGE ME: S3 access credentials go here, along with CloudFront Distribution ID | |
# | |
s3_access='' | |
s3_secret='' |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
$! raise された例外オブジェクト | |
$" require で読み込まれたファイルの配列 | |
$# | |
$$ 現在のプロセス ID | |
$% | |
$& 正規表現にマッチした箇所の文字列 | |
$' 正規表現にマッチした箇所より後ろの文字列 | |
$( | |
$) | |
$* Ruby スクリプトに指定された引数。ARGV と同じ |
box: wercker/php | |
# Build definition | |
build: | |
# The steps that will be executed on build | |
steps: | |
# A custom script s tep, name value is used in the UI | |
# and the code value contains the command that get executed | |
- script: | |
name: echo php information | |
code: | |
// Created by Ullrich Schäfer on 16/08/14. | |
// Bitmasks are a bit tricky in swift | |
// See http://natecook.com/blog/2014/07/swift-options-bitmask-generator/ | |
//enum LogFlag: Int32 { | |
// case Error = 0b1 | |
// case Warn = 0b10 | |
// case Info = 0b100 |
// var GH = ['#EEEEEE', '#D6E685', '#8CC665', '#44A340', '#1E6823']; /* previous GH colors */ | |
var GH = ['#EBEDF0', '#C6E48B', '#7BC96F', '#239A3B', '#196127']; | |
var CO = ['#EF4B4D', '#F89B47', '#FAEA20', '#7DC242', '#5D94CE', '#855CA7']; | |
var graph = document.getElementsByClassName('js-calendar-graph-svg')[0]; | |
var days = [].slice.call(graph.getElementsByTagName('rect'), 0); | |
days.forEach(function(rect) { | |
switch(rect.getAttribute('fill').toUpperCase()) { | |
case GH[0]: rect.setAttribute('fill', CO[2]); break; // yellow |
Project | # of Top 100 Free Apps (US) | |
---|---|---|
facebook-ios-sdk | 67 | |
Bolts-iOS | 48 | |
AFNetworking | 39 | |
Google-Mobile-Ads-SDK | 38 | |
Reachability (Apple) | 38 | |
Crashlytics | 37 | |
Flurry-iOS-SDK | 31 | |
CocoaPods | 30 | |
GoogleConversionTracking | 29 |
# VERSION 1.0.4 | |
# Author: @madhavajay | |
# This currently works for iOS and watchOS in the Simulator and Devices | |
# Changes | |
# Using ${TOOLCHAIN} in two places now | |
# Added double quotes " around paths | |
# Fixed watchOS Issues | |
# Instructions iOS |