An introduction to curl using GitHub's API
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
#!/usr/bin/env bash | |
# Prerequisites: | |
# 1. Install pup | |
# brew install pup | |
# 2. Install jq | |
# brew install jq | |
# set -v |
;; Gaussian sum! | |
user=> (crit/with-progress-reporting (crit/quick-bench (/ (* (+ 1 99999) 99999) 2))) | |
Warming up for JIT optimisations 5000000000 ... | |
compilation occured before 333366 iterations | |
Estimating execution count ... | |
Sampling ... | |
Final GC... | |
Checking GC... | |
WARNING: Final GC required 8.548926352381509 % of runtime | |
Finding outliers ... |
(ns async-examples.load-balancer | |
(:require [clojure.core.async :refer :all])) | |
;; Let's assume we have a DB, and it holds the following pairs of name/ages | |
(def db-store | |
{:john 42 | |
:amy 33 | |
:jill 3 |
import java.text.NumberFormat | |
/** | |
* 数字工具集 | |
*/ | |
class NumberUtils extends org.apache.commons.lang3.math.NumberUtils { | |
private static final _NUMBER_FORMAT = NumberFormat.numberInstance | |
var msg = { | |
subject : "Say Hi~", | |
body : "blablabla..." | |
}; | |
window.location = "mailto:" + MyApp.User.Email + "?" + Ext.urlEncode(msg); |
apply plugin: 'java' | |
group = 'qa.webdriver' | |
subprojects { | |
apply plugin: 'java' | |
project.ext.sourceCompatibility = 1.6 | |
repositories { |
import javax.swing.JEditorPane | |
(args[0] as File).withReader { | |
def p = new JEditorPane() | |
p.contentType = 'text/rtf' | |
def kitRtf = p.getEditorKitForContentType p.contentType | |
kitRtf.read it, p.document, 0 | |
def kitHtml = p.getEditorKitForContentType 'text/html' | |
def out = new StringWriter() |