Skip to content

Instantly share code, notes, and snippets.

var _data = {}
if ((plot_id > 0) && (plot_id < 11)) {
plot_number = "plot_" + plot_id;
}
if ((street_id !== null) && (plot_number !== null) && (plot_id !== null)) {
adc_print("update plot " + plot_number);
{
// Server authentication info
"servers": [
{
"host": "127.0.0.1", // No not this address. Address redacted to protect the innocent.
"username": "digilord",
// "password": "password"
// or pem file (ssh based authentication)
"pem": "~/.ssh/id_dsa"
}
var createThreeAmigos = function(dir, baseName) {
var _array = [];
var _extensions = ['html', 'less', 'coffee'];
for (i = 0; i < _extensions.length; i++) {
var _file = dir + '/' + baseName + '.' + _extensions[i];
_array.push(_file);
}
return _array;
};
<template name="ionNavBar">
<div class="{{classes}} nav-bar-block nav-bar-transition-{{transition}} nav-bar-direction-forward" data-navbar-container>
{{> yield "headerButtonLeft"}}
{{> yield "headerTitle"}}
{{> yield "headerButtonRight"}}
</div>
</template>
<!--
This file is from meteoric
-->
adminSub = Meteor.subscribe 'adminViews'
Router.map ->
@route 'admin',
path: '/admin'
layoutTemplate: 'adminLayoutTemplate'
action: ->
@wait adminSub
@render 'admin'
data: ->
// Test this route with
// curl -F test=testing http://localhost:3000/stripeaccess/
Router.route('stripeaccess',{
path:'/stripeaccess',
where: 'server',
action: function(){
var request = this.request; // From the client
var response = this.response; // Response to the client
// 1. receive the JSON from Stripe
@digilord
digilord / example.js
Created October 31, 2014 17:47
Generate regex for accented characters example
var userInput='bla';
var regex = "";
var lookup = {
"a": "à"
}
var accentedCharacters = "àèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸçÇßØøÅåÆæœ";
function replaceLetterWithOrBlock(letter){
var orBlock = letter;
var accentedLetter = lookup[letter];
server {
listen 80;
server_name www.example.com;
client_max_body_size 500M;
access_log /var/log/nginx/meteorapp.access.log;
error_log /var/log/nginx/meteorapp.error.log;
location / {
proxy_pass http://localhost:3000;
@digilord
digilord / router.js
Created October 15, 2014 21:26
Sample Router
Router.route('home', {
path: '/',
data: {title: 'My Title'}
});
// when you navigate to "/one" automatically render the template named "One".
Router.route('/one');
// when you navigate to "/two" automatically render the template named "Two".
Router.route('/two');
[digilord@Cassiopeia app[master*]]$ meteor
[[[[[ ~/projects/inservice/app ]]]]]
=> Started proxy.
=> Started MongoDB.
W20141013-10:31:00.173(-7)? (STDERR)
W20141013-10:31:00.229(-7)? (STDERR) /Users/digilord/.meteor/packages/meteor-tool/.1.0.33.nwimf8++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:173
W20141013-10:31:00.229(-7)? (STDERR) throw(ex);
W20141013-10:31:00.229(-7)? (STDERR) ^
W20141013-10:31:00.229(-7)? (STDERR) TypeError: Object #<Object> has no method 'describe'