type Customer {
id: ID!
email: 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
The Y-axis in an SVG document points towards the bottom of the page, that is the Y value increases the further down the page | |
you go. When positioning items in a maths or physics context however it is more appropriate to have the Y-axis pointing up | |
the page like a normal coordinate system. We can provide an affine transformation matrix to a g element's transform | |
attribute that flips the Y-axis for its children. | |
Let the value of the viewBox attribute of the document's SVG element equal "0 0 w h". Suppose we want a coordinate system | |
whose origin is at the centre of the viewbox and whose Y-axis points up to the top of the page. | |
(0, 0) | |
O_ _ _ _ _ _ _ _\ X (Default SVG coordinate system/frame) |
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
# Bash function to send email via Gmail SMTP | |
# sendEmail [subject] [toEmail] [message] (optional attachment path) | |
function sendEmail(){ | |
if (($# < 3 )) | |
then | |
echo "" | |
echo "Usage:" | |
echo "sendEmail [subject] [toEmail] [message] (optional attachment path)" | |
echo "" | |
exit 1 |
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
import setupCSS from './load-css-require.js' | |
setupCSS(__dirname, (err) => { | |
if (err) throw err | |
require('my-front-end-components-that-require-css-files.js') | |
}) |
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
/** | |
* Module dependencies | |
*/ | |
// nothing yet | |
/** | |
* Constantes | |
*/ | |
var PREFIXES = ["webkit", "moz", "ms"] |
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/bash | |
if [ "$#" -ne "1" ]; then | |
echo "Usage: $0 package_list" | |
exit 1 | |
fi | |
cat $1 | xargs -I {} bash -c "echo {}; brew deps {}" | sort | uniq > /tmp/brew_keep | |
comm -23 <(brew list -1 | sort) <(cat /tmp/brew_keep) > /tmp/brew_rm | |
lines=$(cat /tmp/brew_rm | wc -l | sed -e 's/ //g') |
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers
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
- certain endpoints are always blocked | |
if nginx_uri == "/_access_token" or nginx_uri == "/_me" then | |
ngx.exit(403) | |
end | |
-- import requirements | |
local cjson = require "cjson" | |
-- setup some app-level vars | |
local app_id = "APP_ID" |
http://wiki.nginx.org/HttpLuaModule#Installation
install LuaJIT
$ brew install luajit
download ngx_devel_kit
NewerOlder