This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).keydown(function(e){ | |
| // Ignore the keypress if any meta keys were pressed along with the arrows | |
| if(e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) return; | |
| // Left arrow | |
| if(e.keyCode == 37) { | |
| // Find a rel="prev" link on the page | |
| if($("a[rel='prev']").length > 0){ | |
| // Highlight it briefly | |
| $("a[rel='prev']").addClass('hover'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ target="http://waterpigs.co.uk/notes/4RvAFv/" | |
| $ source="http://aaronparecki.com/replies/2013/09/07/2/indiewebcampuk" | |
| $ curl -i -s $target | grep 'rel="http://webmention.org/"' | |
| Link: <http://waterpigs.co.uk/mentions/webmention/>; rel="http://webmention.org/" | |
| $ endpoint="http://waterpigs.co.uk/mentions/webmention/" | |
| $ curl -i -d "source=$your_url&target=$target_url" $endpoint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: nginx | |
| # Required-Start: $remote_fs $syslog | |
| # Required-Stop: $remote_fs $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: nginx init.d dash script for Ubuntu <=9.10. | |
| # Description: nginx init.d dash script for Ubuntu <=9.10. | |
| ### END INIT INFO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ grep -r "\[Weather\]" . | cut -f4 -d: | cut -f 3- -d " " | sed -e 's/(.*$//g' -e 's/ for the.*//g' -e 's/ /_/g' | awk '{x[$0]++}END{for(i in x){printf("%s\t%d\n", i, x[i])}}' | sort -nk2| column -t -s " " | gtac | |
| Light_rain 46 | |
| Clear 44 | |
| Drizzle 24 | |
| Possible_drizzle 8 | |
| Sprinkling 5 | |
| Rain 4 | |
| Possible_sprinkling 4 | |
| Possible_light_rain 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| double lng1 = [bbox[0] doubleValue]; | |
| double lat1 = [bbox[1] doubleValue]; | |
| double lng2 = [bbox[2] doubleValue]; | |
| double lat2 = [bbox[3] doubleValue]; | |
| MKCoordinateSpan span; | |
| span.latitudeDelta = fabs(lat2 - lat1); | |
| span.longitudeDelta = fabs(lng2 - lng1); | |
| CLLocationCoordinate2D center; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "game": { | |
| "game_id": "pj9Zb8okVfqEHUCt", | |
| "name": "Aaron Test Board 10", | |
| "bbox": [ | |
| -122.688703536987, | |
| 45.511970901574, | |
| -122.669649124146, | |
| 45.5231270146092 | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var commentContainerSelector = '.references ul'; | |
| if($(commentContainerSelector).length > 0 && "WebSocket" in window) { | |
| var ws = new WebSocket(window.location.origin.replace("http","ws")+":8077"); | |
| ws.onopen = function(event) { | |
| // Send the current window URL to the server to register to receive notifications about this URL | |
| ws.send(window.location); | |
| }; | |
| ws.onmessage = function(event) { | |
| // Whatever comes back from the websockets connection is rendered in the list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteEngine on | |
| RewriteRule ([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})\.png img.php?r=$1&g=$2&b=$3 [QSA,L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ch = curl_init('https://www.arcgis.com/sharing/oauth2/token'); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); | |
| curl_setopt($ch, CURLOPT_POST, TRUE); | |
| curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array( | |
| 'grant_type' => 'client_credentials', | |
| 'client_id' => $client_id, | |
| 'client_secret' => $client_secret | |
| ))); | |
| $response = json_decode(curl_exec($ch)); | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.