An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
| local verb, resource, version, headers, body = data:match("(.+)%s+(.+)%s+(HTTP/%d%.?%d?)\r\n(.-)\r\n\r\n(.-)") | |
| headers:gsub("(.-)%s*:%s*(.-)\r\n", function(name, value) | |
| -- do something with name and value here | |
| end) |
| #!/bin/bash | |
| # Use this with a global hotkey to the following: gksudo [FULLPATH]/enterpass.sh | |
| if [[ $EUID -ne 0 ]] ; then | |
| notify-send "This script must be run as root" | |
| exit | |
| fi | |
| if ! command -v userpass > /dev/null ; then |
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
| cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git |
| window.localforage.getItem('context') | |
| .then(function(result){ | |
| console.log('-- Result ---'); | |
| console.log(result); | |
| }, function(err){ | |
| console.log('--- Error ---'); | |
| console.log(err); | |
| }) |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
| /* | |
| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
| * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
| * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
| * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
| * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
| * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
| * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
| * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <!-- Object Format Tests --> | |
| <script src='tiles.js'></script> | |
| <!-- Binary Format Tests --> | |
| <!--<script src='tiles-binary.js'></script>--> | |
| </head> | |
| <body> | |
| </body> |
I hereby claim:
To claim this, I am signing this object: