An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
// Converts an ArrayBuffer directly to base64, without any intermediate 'convert to string then | |
// use window.btoa' step. According to my tests, this appears to be a faster approach: | |
// http://jsperf.com/encoding-xhr-image-data/5 | |
/* | |
MIT LICENSE | |
Copyright 2011 Jon Leighton | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
// jQuery Deparam - v0.1.0 - 6/14/2011 | |
// http://benalman.com/ | |
// Copyright (c) 2011 Ben Alman; Licensed MIT, GPL | |
(function($) { | |
// Creating an internal undef value is safer than using undefined, in case it | |
// was ever overwritten. | |
var undef; | |
// A handy reference. | |
var decode = decodeURIComponent; |
//Requires: | |
//JQuery | |
//slowAES (http://code.google.com/p/slowaes/) | |
//pbkdf2 (1.1) by Parvez Anandam (http://anandam.name/pbkdf2) | |
//sha1 (2.1a) by Paul Johnston (http://pajhome.org.uk/crypt/md5) | |
(function(window, document, $, undefined){ | |
$(document).ready(function() { | |
var startTime = new Date(); |
web: node app.js | |
worker: node consumer.js |
Element = function(){}; |
package models.sgcore; | |
import com.avaje.ebean.event.BeanPersistAdapter; | |
import com.avaje.ebean.event.BeanPersistRequest; | |
import javax.annotation.PreDestroy; | |
import javax.persistence.*; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.util.HashMap; |
@-webkit-keyframes bgcolor { 0% { background-color: #ffccf2; } | |
50% { background-color: #ccffcc; } | |
100% { background-color: #ccffff; } } | |
@-moz-keyframes bgcolor { 0% { background-color: #ffccf2; } | |
50% { background-color: #ccffcc; } | |
100% { background-color: #ccffff; } } | |
@-ms-keyframes bgcolor { 0% { background-color: #ffccf2; } | |
50% { background-color: #ccffcc; } |
# replace PAPERTRAIL_HOSTNAME and PAPERTRAIL_PORT | |
# see http://help.papertrailapp.com/ for additional PHP syslog options | |
function send_remote_syslog($message, $component = "web", $program = "next_big_thing") { | |
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); | |
foreach(explode("\n", $message) as $line) { | |
$syslog_message = "<22>" . date('M d H:i:s ') . $program . ' ' . $component . ': ' . $line; | |
socket_sendto($sock, $syslog_message, strlen($syslog_message), 0, PAPERTRAIL_HOSTNAME, PAPERTRAIL_PORT); | |
} | |
socket_close($sock); |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
<ivysettings> | |
<!-- Build.scalaのsettingsにexternalIvySettings()を追加すると有効 --> | |
<caches useOrigin="true"/> | |
<settings defaultResolver="play"/> | |
<resolvers> | |
<chain name="play"> | |
<filesystem name="1"> | |
<!-- ここは絶対パスじゃないとだめ。playの${sbt.ivy.home}は相対パスだった --> | |
<artifact pattern="/Users/yasushi/src/play/play-2.0/repository/local/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" /> | |
</filesystem> |