- Create your realm / client
- Inside client configuration go to "Mappers"
- Click on "Create"
- Name it "hasura"
- Choose Mapper Type "Script Mapper"
- Add following script to demonstrate how it works
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
/** | |
* BitMEX JAZZ BEEP | |
* | |
* Aural indication of XBTUSD price movements via BitMEX websocket realtime-trade data. | |
* Uses the blues scale to add some funk to your trading. | |
* | |
*/ | |
var options = { |
By default when Nginx starts receiving a response from a FastCGI backend (such as PHP-FPM) it will buffer the response in memory before delivering it to the client. Any response larger than the set buffer size is saved to a temporary file on disk.
This process is outlined at the Nginx ngx_http_fastcgi_module page manual page.
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
<? | |
/** | |
* Debug helper function. This is a wrapper for var_dump() that adds | |
* the <pre /> tags, cleans up newlines and indents, and runs | |
* htmlentities() before output. | |
* | |
* @param mixed $var The variable to dump. | |
* @param string $label OPTIONAL Label to prepend to output. | |
* @param bool $echo OPTIONAL Echo output if true. | |
* @return string |
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
/** | |
* HTTP Header Security | |
* | |
* enforce HTTP Strict Transport Security (HSTS) to prevent ManInTheMiddle-attacks | |
* on supported browsers (all, but IE) | |
* > http://www.html5rocks.com/en/tutorials/security/transport-layer-security | |
* | |
* @header Strict-Transport-Security: max-age=2592000; includeSubDomains | |
*/ |
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
// ///////////////////////////////////////////////// | |
// this file contains all the classes related to a | |
// market. | |
// ///////////////////////////////////////////////// | |
var log4js = require('log4js'); | |
var logger = log4js.getLogger(require('path').basename(__filename, '.js')); | |
require('es6-collections'); | |
var _ = require('underscore'); | |
/** |
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
// 200k entries and more | |
HugeCollection = new Meteor.Collection("HugeCollection"); | |
// convenience collection to hold the computed stats of HugeCollection | |
StatsForHugeCollection = new Meteor.Collection("StatsForHugeCollection"); | |
/** | |
* Observer | |
*/ |
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
////////// Requires ////////// | |
var Fiber = require("fibers"); | |
var fs = require("fs"); | |
var http = require("http"); | |
var path = require("path"); | |
var url = require("url"); | |
// connect (and some other NPM modules) use $NODE_ENV to make some decisions; |
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
#!/usr/bin/env bash | |
#get own hostname | |
ME=$(hostname); | |
# find replica-set master, we think its the first in the array | |
MASTER=`mongo --quiet --eval "cfg=rs.config(); print( cfg.members[0].host );"` | |
# connect to master, add ME | |
mongo --host $MASTER --eval "print( rs.add('"$ME"') );" |
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
server { | |
server_name thomassteinhauer.com; | |
location / { | |
root /var/www/app/bundle/; | |
} | |
location /admin { | |
root /var/www/admin/bundle/; | |
} |
NewerOlder