git init
or
// Adapted from: http://stackoverflow.com/questions/563198/how-do-you-detect-where-two-line-segments-intersect/1968345#1968345 | |
function line_intersects(p0_x, p0_y, p1_x, p1_y, p2_x, p2_y, p3_x, p3_y) { | |
var s1_x, s1_y, s2_x, s2_y; | |
s1_x = p1_x - p0_x; | |
s1_y = p1_y - p0_y; | |
s2_x = p3_x - p2_x; | |
s2_y = p3_y - p2_y; | |
var s, t; |
# Version key/value should be on his own line | |
PACKAGE_VERSION=$(cat package.json \ | |
| grep version \ | |
| head -1 \ | |
| awk -F: '{ print $2 }' \ | |
| sed 's/[",]//g') | |
echo $PACKAGE_VERSION |
var pack = require('./package.json'); | |
var request = require('request'); | |
var name = pack.name; | |
module.exports = function (shipit) { | |
require('shipit-deploy')(shipit); | |
var deployTo = '/var/www/FOLDER_TO_DEPLOY_TO'; | |
var deployToCurrent = deployTo + '/current'; | |
var slackWebhookURL = 'SLACK_HOOK_URL'; |
#!/usr/bin/env python3 | |
import requests | |
from flask import * | |
import random | |
from apscheduler.schedulers.background import BackgroundScheduler | |
app = Flask(__name__) | |
scheduler = BackgroundScheduler() | |
url = "https://reddit.com/r/gonewild/comments.json?limit=200" |
Watch a table for changes and push a notification with a payload describing the change.
In the Postgres shell:
-- Create the functions
files: | |
"/etc/nginx/conf.d/gzip.conf": | |
mode: "644" | |
owner: "root" | |
group: "root" | |
content: | | |
# enable gzip compression | |
gzip on; | |
gzip_min_length 1100; | |
gzip_buffers 4 32k; |
This document outlines setting up google's ruby gem, google-api-client, to verify payloads(receipts) sent to a server from google play in app purchases made via an android app.
This document was written using version 0.9.13.
First you'll need 'owner' access to the google play developer's console that contains the mobile app you wish to verify receipts from.
Next setup an api account
import React, { Component, PropTypes } from 'react' | |
import { G, Line, Text } from 'react-native-svg' | |
import * as d3scale from 'd3-scale' | |
export default class Axis extends Component { | |
static propTypes = { | |
width: PropTypes.number.isRequired, | |
ticks: PropTypes.number.isRequired, | |
x: PropTypes.number, | |
y: PropTypes.number, |
Kinesis Freestyle (Terrible key switches. Mushy and un-lovable)
Kinesis Freestyle Edge (Traditional layout with too many keys, mech switches, proably too big to be tented easily/properly)
Matias Ergo Pro (Looks pretty great. Have not tried.)
ErgoDox Kit (Currently, my everyday keyboard. Can buy pre-assembled on eBay.)
ErgoDox EZ (Prolly the best option for most people.)