A full-featured markdown parser and compiler, written in javascript. Built for speed.
node v0.4.x
$ node test --bench
# Capistrano Deploy Recipe for Git and Phusion Passenger | |
# | |
# After issuing cap deploy:setup. Place server specific config files in | |
# /home/#{user}/site/[staging|production]/shared | |
# Set :config_files variable to specify config files that should be | |
# copied to config/ directory (i.e. database.yml) | |
# | |
# To deploy to staging server: | |
# => cap deploy | |
# => Deploys application to /home/#{user}/site/staging from master branch |
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
$ rails console | |
Loading development environment (Rails 3.0.6) | |
ruby-1.8.7-p334 :001 > r = Rails.application.routes | |
Gives you a handle of all the routes (config/routes.rb) | |
#Inspect a named route: | |
ruby-1.8.7-p334 :005 > r.recognize_path(app.destroy_user_session_path) | |
=> {:action=>"destroy", :controller=>"sessions"} |
var INCR = 16; // Number of messages per page | |
var SENT_URL = '//www.linkedin.com/inbox/invitations/sent?startRow='; | |
var loMessageLinks = []; // Main array for all contacts | |
var fetchMessages = function(i, cb) { | |
console.log('Fetching message page #' + (i+1)); | |
$.get(SENT_URL + (i*INCR), function(data){ | |
var $dom = $(data); | |
# the IP(s) on which your node server is running. I chose port 3000. | |
upstream app_geoforce { | |
server 127.0.0.1:3000; | |
} | |
upstream app_pcodes{ | |
server 127.0.0.1:3001; | |
} |
[Unit] | |
Description=consul agent | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
EnvironmentFile=-/etc/sysconfig/consul | |
Environment=GOMAXPROCS=2 | |
Restart=on-failure | |
ExecStart=/usr/local/sbin/consul agent $OPTIONS -config-dir=/etc/consul.d |
import { EventEmitter } from 'events' | |
import { isTokenExpired } from './jwtHelper' | |
import Auth0LockPasswordless from 'auth0-lock-passwordless'; | |
export default class AuthService extends EventEmitter { | |
constructor(clientId, domain) { | |
super() | |
// Configure Auth0 Passwordless | |
// We’ll get the clientId and domain credentials from our .env file we created | |
this.lock = new Auth0LockPasswordless(clientId, domain) | |
import React, { PropTypes as T } from 'react' | |
import {ButtonToolbar, Button} from 'react-bootstrap' | |
import AuthService from 'utils/AuthService' | |
import styles from './styles.module.css' | |
export class Login extends React.Component { | |
static contextTypes = { | |
router: T.object | |
} |
#!/bin/sh | |
# | |
# Dump AWS Cognito users as CSV output. | |
# | |
# Thu Jun 20 15:31:10 CEST 2019, Andrea Leofreddi | |
# | |
me="`basename $0`" | |
if [ $# != 1 ]; then | |
echo Usage: "$me" pool_id >&2 |