An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| license: gpl-3.0 | |
| redirect: https://observablehq.com/@d3/zoomable-icicle |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| ## Setup java | |
| if [ `uname -m` == 'x86_64' ]; then | |
| PATH="/usr/lib64/jvm/java-7-oracle/jre/bin/" | |
| JAVA_HOME="/usr/lib64/jvm/java-7-oracle/" | |
| else | |
| PATH="/usr/lib/jvm/java-7-oracle/jre/bin/" | |
| JAVA_HOME="/usr/lib/jvm/java-7-oracle/" | |
| fi |
| private static List < Lead > getAllLeads() { | |
| return [SELECT | |
| FirstName, LastName, Company, Title, Phone, MobilePhone, Email, Status | |
| FROM Lead LIMIT 50]; | |
| } |
| @RemoteAction | |
| public static Response Query(QueryRequest qr) { | |
| Response resp = new Response(); | |
| //Enforce a limit on the number of rows requested. | |
| final integer QUERY_LIMIT = 500; | |
| if (qr.start >= QUERY_LIMIT) { | |
| resp.success = false; | |
| resp.errorMessage = 'Maximum number of records (' + String.valueOf(QUERY_LIMIT) + ') exceeded!'; |
| <div class='yui3-g'> | |
| <div class="yui3-u-1-3">...</div> | |
| <div class="yui3-u-1-3">...</div> | |
| <div class="yui3-u-1-3">...</div> | |
| </div> |
| //Filesystem (checkDir, createDir, checkFile, creatFile, removeFile, writeFile, readeFile) | |
| .factory('FileService', function($q) { | |
| return { | |
| checkDir: function (dir) { | |
| var deferred = $q.defer(); | |
| getFilesystem().then( | |
| function(filesystem) { | |
| filesystem.root.getDirectory(dir, {create: false}, |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase /prerender-test/ | |
| # Virtual/pushState URIs (requests not matching an existing file get forwarded to index.html) | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule .* index.html [L] | |
| <IfModule mod_proxy_http.c> |