An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| #!/usr/bin/env python3 | |
| import tkinter | |
| from time import strftime | |
| def tic(): | |
| rel['text'] = strftime('%H:%M:%S') | |
| def tac(): | |
| tic() | |
| rel.after(1000, tac) |
Press minus + shift + s and return to chop/fold long lines!
| $(document).ready(function (){ | |
| // Get the image and canvas nodes | |
| var img = $('#original_image')[0]; | |
| var canvas = $('#original_canvas')[0]; | |
| // confirm that the image has loaded | |
| img.addEventListener("load", function() { | |
| // set the canvas dimensions | |
| canvas.width = img.width; | |
| canvas.height = img.height; |
| 7z u Scripts.zip Scripts\*.sql -uq0 |
| import SimpleHTTPServer | |
| class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
| def send_head(self): | |
| """Common code for GET and HEAD commands. | |
| This sends the response code and MIME headers. | |
| Return value is either a file object (which has to be copied | |
| to the outputfile by the caller unless the command was HEAD, | |
| and must be closed by the caller under all circumstances), or |
| #include <assert.h> | |
| int sum(int a, int b) | |
| { | |
| return a + b; | |
| } | |
| int multi(int a, int b) | |
| { | |
| return a * b; |
| #!/bin/bash | |
| clear | |
| while true; do | |
| read -p 'C:\>' cmd | |
| case $cmd in | |
| ver) | |
| echo -e "\nMS-DOS Version 6.22\n\n" ;; |