Skip to content

Instantly share code, notes, and snippets.

Brock Whitten sintaxi

Block or report user

Report or block sintaxi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View harp
Harp - Web Publishing Service (v1.0)
Usage: harp <dir> [domain]
Commands:
harp <dir> Starts development server on project directory
harp <dir> <domain> Deploys project directory to the web
harp <dir> <dir> Compiles project directory to other directory
@sintaxi
sintaxi / boot-issue.md
Last active Nov 20, 2015
Issues with my recent Asus X99 build.
View boot-issue.md

Expectation

  • To be able to boot/install operating system's on my X99 build.

Reality

  • Installing any operating system causes the machine to freeze.

Facts

@sintaxi
sintaxi / cli.js
Last active Oct 20, 2015
Example surge CLI integration
View cli.js
/**
* Surge Integration
*/
var surge = require('surge')({ platform: "harpjs.com" })
var hooks = {
postProject: function(req, next){
View gist:afff3fc849abfcd4cdc9
var m = React.createElement
var Header = React.createClass({
role: 'Header',
render: function(){
return m("header", { role:"banner" },
m("div", { id: "cd-logo" },
m("a", {},
m("img", { src: "img/cd-logo.svg", alt: "Logo" })
@sintaxi
sintaxi / gist:4a2ba0ee6d843748cd5d
Created Jun 24, 2015
compile harp project using NodeJS
View gist:4a2ba0ee6d843748cd5d
var harp = require("harp")
harp.compile("source", "www", function(errors, output){
console.log(output)
})
View gist:249c4e1d15ff526e2570
-----BEGIN CERTIFICATE-----
[...]
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
[...]
-----END RSA PRIVATE KEY-----
@sintaxi
sintaxi / gist:26924fc02788fa6e4075
Created Apr 27, 2015
check to see if cert used key.
View gist:26924fc02788fa6e4075
(openssl x509 -noout -modulus -in my.crt | openssl md5 ; openssl rsa -noout -modulus -in my.key | openssl md5) | uniq
@sintaxi
sintaxi / surge.js
Last active Aug 29, 2015
surge library interface
View surge.js
var surge = require("surge")
var readableStream = surge.createReadableStream("path/to/project")
surge.publish(readableStream, { domain: "foobar.com", email: "brock@sintaxi.com", password: "bigsecret" }, function(errors, deployment){
if (errors) return "invalid arguments. cant deploy."
deployment.on("error", function(err){
console.log("Oops! something went wrong")
})
View gist:bcec8a3f28533a139b3c
Surge Analytics
Free Tier
- number of visits
- device type breakdown (desktop/tablet/phone/etc)
- status code breakdown (200/206/404/304/etc)
- page visits breakdown (number of requests to most popular endpoints)
View domain-helper.js
/**
* Implementation
*/
var url = require("url")
var u = function(domain){
var urlObj = url.parse(domain || "https://foo.com")
You can’t perform that action at this time.