This file contains 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
package main | |
import ( | |
"net/http" | |
"net/url" | |
) | |
func main() { | |
values := url.Values{ | |
"phone": {"5555555"}, |
This file contains 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 request = require('request'); | |
request.post('https://textbelt.com/text', { | |
form: { | |
phone: '5555555555', | |
message: 'Hello world', | |
key: 'textbelt', | |
}, | |
}, function(err, httpResponse, body) { | |
if (err) { |
This file contains 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 | |
# This script will migrate schema and data from a SQLite3 database to PostgreSQL. | |
# Schema translation based on http://stackoverflow.com/a/4581921/1303625. | |
# Some column types are not handled (e.g blobs). | |
if [ $# -lt 3 ]; then | |
echo "usage: sqlite2pg.sh sqlite_db_path pg_db_name pg_user_name"; | |
exit 1 | |
fi |
This file contains 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
{ | |
type: 'radar', | |
data: { | |
labels: ['Jan', 'Feb', 'March', 'April', 'May'], | |
datasets: [{ | |
data: [ 50, 60, 70, 80, 90 ], | |
backgroundColor: 'transparent', | |
borderColor: 'red', | |
}] | |
}, |
This file contains 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
{ | |
type: 'bar', | |
data: { | |
labels: ['January', 'February', 'March', 'April', 'May'], | |
datasets: [{ | |
label: 'Dogs', | |
data: [ 50, 60, 70, 180, 190 ] | |
}, { | |
label: 'Cats', | |
data: [ 100, 200, 300, 400, 500 ] |
This file contains 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
{ | |
"type": "pie", | |
"data": { | |
"labels": [ | |
"January", | |
"February", | |
"March", | |
"April", | |
"May" | |
], |
This file contains 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
const sin = Math.sin; | |
const cos = Math.cos; | |
/** | |
* Get heliocentric position of object at a given JD. | |
* @param {Number} jd Date value in JD. | |
* @return {Array.<Number>} [X, Y, Z] coordinates | |
*/ | |
getPositionAtTime(jd) { | |
const eph = this._ephem; |
This file contains 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
alembic==0.9.5 | |
altgraph==0.14 | |
aniso8601==1.3.0 | |
apipkg==1.4 | |
area==1.1.0 | |
argh==0.26.2 | |
asn1crypto==0.22.0 | |
astroid==1.4.9 | |
atomicwrites==1.1.5 | |
attrs==18.1.0 |
This file contains 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
set nocompatible | |
filetype indent on | |
set backspace=indent,eol,start | |
set cul " cursor line | |
set cpo+=J | |
" Exit visual mode without delay. | |
set timeoutlen=1000 ttimeoutlen=0 |
This file contains 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
# Template composition with inclusion | |
Every template language I have seen provides some mechanism for one template to include another, thus supporting the reuse of repeated elements like headers and footers. The included templates are called partials in Mustache parlance: | |
```html | |
<!-- home.hbs --> | |
<html> | |
<body> | |
{{> header}} | |
<p> HOME </p> | |
{{> footer}} |