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
types { | |
text/html html htm shtml; | |
text/css css; | |
text/xml xml; | |
image/gif gif; | |
image/jpeg jpeg jpg; | |
application/x-javascript js; | |
application/atom+xml atom; | |
application/rss+xml rss; |
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 you are developing on OSX on Windows | |
# but you want to run on linux - or in docker - or on AWS Lambda | |
# PhantomJS must be the binary for that OS... | |
# https://github.com/sindresorhus/pageres/issues/275 | |
# | |
# Easiest solution, download inside a docker, running on linux | |
# | |
# This script should be run from within the docker container | |
# |
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
{ | |
"$schema": "https://vega.github.io/schema/vega/v5.json", | |
"description": "A radar chart example, showing multiple dimensions in a radial layout.", | |
"width": 400, | |
"height": 400, | |
"padding": 40, | |
"autosize": {"type": "none", "contains": "padding"}, | |
"signals": [{"name": "radius", "update": "width / 2"}], | |
"data": [ | |
{ |
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
# ====================================================================== | |
# | |
# @link http://wuhrr.wordpress.com/2010/01/13/adding-confirmation-to-bash/#comment-3540 | |
# | |
# Function: confirm | |
# Asks the user to confirm an action, If the user does not answer yes, | |
# then the script will immediately exit. | |
# | |
# Parameters: | |
# $@ - The confirmation message |
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
defmodule Eltoroportal.Accounts.User do | |
use Ecto.Schema | |
import Ecto.Changeset | |
alias Eltoroportal.Accounts.User | |
@primary_key {:_id, :string, autogenerate: false} | |
schema "users" do | |
field :username, :string | |
# field :created, :date # <-- ? mongo translation? |
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
<?php | |
/* Standardized data cleanup helper class */ | |
class Cleanup { | |
/** | |
* Make a string into UTF8 compliant... cleans funcky input characters | |
* @param mixed $str | |
* @return mixed $str | |
*/ | |
static function makeUTF8($str) { | |
if (is_array($str)) { |
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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
#ZSH_THEME="alanpeabody" | |
#ZSH_THEME="dieter" | |
#ZSH_THEME="eastwood" |
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
==> /var/log/newrelic/newrelic-daemon.log <== | |
Received signal 11: segmentation violation | |
fatal signal (SIGSEGV, SIGFPE, SIGILL, SIGBUS, ...) - stack dump follows (code=0x807d240 data=0x82f7420 bss=0x82e7334): | |
/usr/bin/newrelic-daemon(nr_signal_tracer_common+0xc0)[0x8080d70] | |
/usr/bin/newrelic-daemon[0x8082732] | |
[0xb77d7400] | |
/usr/bin/newrelic-daemon(lh_insert+0x121)[0x8120d36] | |
/usr/bin/newrelic-daemon[0x80fd09c] | |
/usr/bin/newrelic-daemon[0x80fd77c] | |
/usr/bin/newrelic-daemon(ENGINE_new+0x6f)[0x81153d8] |
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
// initialize as soon as the DOM is ready | |
Session.set('CordovaLoaded', false); | |
Meteor.startup(function() { | |
console.log('cordova loading'); | |
// delay loading of cordova until after DOM is ready | |
// determine WHICH cordova to load | |
var cordovajspath = '/cordova-2.6.0.js'; | |
if (navigator.userAgent.match(/(iPad|iPhone|iOS)/) != null) { | |
cordovajspath = '/cordova-2.6.0-ios.js'; | |
} else if (navigator.userAgent.match(/(Android)/) != null) { |
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
var Buffer = require('buffer').Buffer; | |
var wkx = require('wkx'); | |
function convertHex(hexInput) { | |
var wkbBuffer = new Buffer(hexInput.slice(2), 'hex'); | |
var geometry = wkx.Geometry.parse(wkbBuffer); | |
return geometry.toGeoJSON(); | |
} | |
function convertTwkb(hexInput) { | |
var wkbBuffer = new Buffer(hexInput.slice(2), 'hex'); |
NewerOlder