This file contains hidden or 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 | |
#============================ | |
# | |
# | |
# Meteor Deployment Script | |
# | |
# Require Installtion of pm2 | |
# | |
#============================ | |
Project_name= |
This file contains hidden or 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://bl.ocks.org/herrstucki/4327678 | |
var width = 960, | |
height = 500; | |
var path = d3.geo.path() | |
.projection(null); | |
var svg = d3.select("body").append("svg") | |
.attr("width", width) | |
.attr("height", height); | |
d3.json("/swiss/ch.json", function (error, ch) { |
This file contains hidden or 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://feeds.reuters.com/news/artsculture | |
http://feeds.reuters.com/reuters/businessNews | |
http://feeds.reuters.com/reuters/companyNews | |
http://feeds.reuters.com/reuters/entertainment | |
http://feeds.reuters.com/reuters/environment | |
http://feeds.reuters.com/reuters/healthNews | |
http://feeds.reuters.com/reuters/lifestyle | |
http://feeds.reuters.com/news/reutersmedia | |
http://feeds.reuters.com/news/wealth | |
http://feeds.reuters.com/reuters/MostRead |
This file contains hidden or 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
function string_to_slug (str) { | |
str = str.replace(/^\s+|\s+$/g, ''); // trim | |
str = str.toLowerCase(); | |
// remove accents, swap ñ for n, etc | |
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;"; | |
var to = "aaaaeeeeiiiioooouuuunc------"; | |
for (var i=0, l=from.length ; i<l ; i++) { | |
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i)); | |
} |
This file contains hidden or 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
function string_to_slug (str) { | |
str = str.replace(/^\s+|\s+$/g, ''); // trim | |
str = str.toLowerCase(); | |
// remove accents, swap ñ for n, etc | |
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;"; | |
var to = "aaaaeeeeiiiioooouuuunc------"; | |
for (var i=0, l=from.length ; i<l ; i++) { | |
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i)); | |
} |
This file contains hidden or 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
Red [needs: 'view] | |
CRLF: copy "^M^/" ;; constant for 0D 0A line feed | |
;;------------------------------------ | |
crypt: func ["function to en- or decrypt message from textarea tx1" | |
/decrypt "decrypting switch/refinement" ][ | |
;;------------------------------------ | |
;; when decrypting we have to remove the superflous newlines | |
;; and undo the base64 encoding first ... |
This file contains hidden or 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
// https://blog.meteor.com/using-promises-and-async-await-in-meteor-8f6f4a04f998 | |
import { Promise } from 'meteor/promise'; | |
async function run(command) { | |
log('Running: ', command); | |
return execSync(command).toString().trim(); | |
} | |
This file contains hidden or 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://www.red-by-example.org/#call | |
The word call executes a shell command to run another process. | |
The argument is: | |
A command [string! file!] - A shell command or an executable file. | |
Refinements | |
/wait - Runs command and waits for exit. |
This file contains hidden or 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 { Meteor } from 'meteor/meteor'; | |
log = console.log | |
Meteor.startup(() => { | |
// code to run on server at startup | |
process.env.ROOT_URL = 'http://localhost'; | |
process.env.PORT = 3333 | |
log('Running at http://localhost:3333') | |
}); |
This file contains hidden or 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
Red [ | |
Title: Simple HTML Generation Test | |
] | |
data: [ | |
title: "This is the title" | |
content: "This is a content block" | |
] | |
html: { | |
<HTML> |