Based on the timeless TextMate theme.
Foreground: #FEFFD3
Background: #141414
alias server='open http://localhost:8000 && python -m SimpleHTTPServer' |
<?php | |
/** | |
* @link http://snipt.net/pkarl/pkarlcom-contextualtime/ | |
* @link http://pkarl.com/articles/contextual-user-friendly-time-and-dates-php/ | |
*/ | |
function contextualTime($small_ts, $large_ts=false) { | |
if(!$large_ts) $large_ts = time(); | |
$n = $large_ts - $small_ts; | |
if($n <= 1) return 'less than 1 second ago'; | |
if($n < (60)) return $n . ' seconds ago'; |
#!/usr/bin/env python | |
function server() { | |
local port="${1:-8000}" | |
open "http://localhost:${port}/" | |
python SimpleHTTPServer "$port" | |
} |
# https://github.com/SachaG/Telescope | |
######################## | |
# it should be | |
sudo apt-get install git npm | |
curl https://install.meteor.com | /bin/sh | |
sudo npm install -g meteorite |
There are two JSON API styles:
The ID style is the easiest to get started with, but requires that your clients be able to guess the URLs for related documents. It also locks your API into a particular URL structure, which may become a problem as your API grows.
The URL style requires less guessing on the client side, and makes clients more resilient to API changes, but is trickier to use with relationships and compound documents.
There are two JSON API styles:
The ID style is the easiest to get started with, but requires that your clients be able to guess the URLs for related documents. It also locks your API into a particular URL structure, which may become a problem as your API grows.
The URL style requires less guessing on the client side, and makes clients more resilient to API changes, but is trickier to use with relationships and compound documents.
stopBefore(document, 'getElementById')
stopBefore('document.getElementById') // the same as the previous
stopBefore(Element.prototype, 'removeChild')
// Needed in AndroidManifest: | |
<!-- Permission for using NFC hardware --> | |
<uses-permission android:name="android.permission.NFC"/> | |
<!-- Forcing device to have NFC hardware --> | |
<uses-feature android:name="android.hardware.nfc" android:required="true"/> | |
<!-- Registering app for receiving NFC's TAG_DISCOVERED intent --> | |
<intent-filter> | |
<action android:name="android.nfc.action.TAG_DISCOVERED"/> | |
<category android:name="android.intent.category.DEFAULT"/> | |
</intent-filter> |
Enter this code into the URL bar:
data:text/html;charset=utf-8, <title>TextEditor</title><body contenteditable style="font-size:2rem;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;" spellcheck="false">
Bookmark it for easy access.
Cheers!