Please go here for latest post and feel free to comment
[new post] (https://gist.github.com/idibidiart/49a095b6bc528638f34f)
#!/usr/local/bin/ruby | |
require "hpricot" | |
require "net/http" | |
require "uri" | |
TUMBLR_USER = "user@example.com" | |
TUMBLR_PASS = "thepasswordlol" | |
TUMBLR_DOMAIN = "mytumblrsubdomain.tumblr.com" | |
ORIGINAL_DOMAIN = "http://myoriginaldomain.example.com/" |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: mongodb | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the mongodb data-store | |
# Description: starts mongodb using start-stop-daemon |
// On the page specific file: | |
// "<controller_name>.js", and you import it after the init.js on your application.js | |
// Replace the <controller_name> with the actual name | |
RELASPHERE.<controller_name> = { | |
init: function() { | |
// Your shared code for the whole controller goes here | |
}, | |
index: function() { | |
// Your code for the index page goes here |
Please go here for latest post and feel free to comment
[new post] (https://gist.github.com/idibidiart/49a095b6bc528638f34f)
import globalNavigation from './components/GlobalNavigation/reducer'; | |
import tabs from './components/ApplicationTabs/reducer'; | |
import feed from './components/Feed/reducer'; | |
import { combineReducers } from 'redux-immutable'; | |
const scopeNavigationReducer = (reducer, scopeName) => { | |
return (state, action) => { | |
if (action.scope && action.scope !== scopeName) { | |
return state; | |
} else { |
/** | |
* A redux middleware for processing Meteor methods | |
* When an action is dispatched, it will pass through our middleware. | |
* if denoted a method, we will dispatch the action with readyState of loading | |
* The method passed in is then called, and dispatches further ready states for success/error | |
* The reducer shape should include { data, readyState } for use in the UI | |
* @returns {Function} | |
*/ | |
export default function methodMiddleware() { | |
return (next) => { |
function historySupport() { | |
return !!(window.history && window.history.pushState !== undefined); | |
} | |
function pushPageState(state, title, href) { | |
if (historySupport()) { | |
history.pushState(state, title, href); | |
} | |
} |
Let this serve as a guide for anyone who'd like to dig into router.js's internals, understand what's going on, and hopefully contribute!
router.js
is most popularly known as the routing microlib used by the
Ember.js Router, though other folk have been known to use it beyond
Ember, including some Angular folk who weren't satisfied with
require 'octokit' | |
require 'csv' | |
require 'date' | |
# Github credentials to access your private project | |
USERNAME="USER_NAME" | |
PASSWORD="SEKRIT" | |
# Project you want to export issues from | |
USER="REPO_OWNER" | |
PROJECT="REPO_NAME" |
class ApplicationController < ActionController::Base | |
before_filter :ensure_xhr | |
private | |
def ensure_xhr | |
if request.get? && request.format && (request.format.js? || request.format.json?) | |
head :forbidden unless request.xhr? | |
end | |
end | |
end |