This is a minimal Nginx website configuration. It's a good way to start your next project.
- Ubuntu server
- Nginx
// 1. Load Polymer before any code that touches the DOM. | |
var script = document.createElement("script"); | |
script.src = "/base/bower_components/webcomponentsjs/webcomponents.js"; | |
document.getElementsByTagName("head")[0].appendChild(script); | |
// Delay Jasmine specs until WebComponentsReady | |
var POLYMER_READY = false; | |
beforeEach(function(done) { | |
window.addEventListener('polymer-ready', function () { | |
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
#include <OpenAL/al.h> | |
#include <OpenAL/alc.h> | |
#include <boost/assert.hpp> | |
#include <cstdint> | |
#include <cstdlib> | |
#include <chrono> | |
#include <iostream> |
Github Flavored Markdown (GFMD) is based on Markdown Syntax Guide with some overwriting as described at Github Flavored Markdown
It is easy to write in GFMD. Just write simply like text and use the below simple "tagging" to mark the text and you are good to go!
To specify a paragraph, leave 2 spaces at the end of the line
var webdriver = require('selenium-webdriver'); | |
var fs = require('fs'); | |
var driver = new webdriver.Builder().build(); | |
webdriver.WebDriver.prototype.saveScreenshot = function(filename) { | |
return driver.takeScreenshot().then(function(data) { | |
fs.writeFile(filename, data.replace(/^data:image\/png;base64,/,''), 'base64', function(err) { | |
if(err) throw err; | |
}); |
#!/usr/public/bin/perl -w | |
use strict; | |
use JSON; | |
use JSON::WebToken; | |
use LWP::UserAgent; | |
use HTML::Entities; | |
my $private_key_string = q[-----BEGIN PRIVATE KEY----- |
-- SELECT polygon centroid as latitude/longitude in PostGIS | |
SELECT | |
st_x(st_transform(ST_Centroid(the_geom),4326)) as lat, | |
st_y(st_transform(ST_Centroid(the_geom),4326)) as long | |
FROM table; |
/** | |
* Converts an RGB color value to HSL. Conversion formula | |
* adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
* Assumes r, g, and b are contained in the set [0, 255] and | |
* returns h, s, and l in the set [0, 1]. | |
* | |
* @param Number r The red color value | |
* @param Number g The green color value | |
* @param Number b The blue color value | |
* @return Array The HSL representation |
select table_name from user_tab_columns | |
where table_name = myTable and column_name = myColumn; |