I hereby claim:
- I am seonixx on github.
- I am simonwhite (https://keybase.io/simonwhite) on keybase.
- I have a public key ASDuvzqODUVeDzAZUcVx8o1qMGRbWtXf-jE2pA-MyAEDWgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class MyComponent extends React.Component { | |
constructor(props) { | |
// set the default internal state | |
this.state = { | |
clicks: 0 | |
}; | |
} | |
componentDidMount() { | |
this.refs.myComponentDiv.addEventListener('click', this.clickHandler); |
var pg = require ('pg'); | |
var EventEmitter = require('events'); | |
var util = require('util'); | |
// Build and instantiate our custom event emitter | |
function DbEventEmitter(){ | |
EventEmitter.call(this); | |
} | |
util.inherits(DbEventEmitter, EventEmitter); |
CREATE TRIGGER notify_new_order | |
AFTER INSERT | |
ON "order" | |
FOR EACH ROW | |
EXECUTE PROCEDURE notify_new_order(); |
CREATE OR REPLACE FUNCTION notify_new_order() | |
RETURNS trigger AS | |
$BODY$ | |
BEGIN | |
PERFORM pg_notify('new_order', row_to_json(NEW)::text); | |
RETURN NULL; | |
END; | |
$BODY$ | |
LANGUAGE plpgsql VOLATILE | |
COST 100; |
#!/bin/bash | |
BROWSERSTACK_TUNNEL_URL="https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip" | |
BROWSERSTACK_TUNNEL_DIR="/tmp/browserstack-$RANDOM" | |
mkdir -p $BROWSERSTACK_TUNNEL_DIR | |
cd $BROWSERSTACK_TUNNEL_DIR | |
curl $BROWSERSTACK_TUNNEL_URL > BrowserStackLocal.zip | |
unzip BrowserStackLocal.zip |