Headline | Time |
---|---|
Total time | 0:00 |
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
(defn force-login [app] | |
(fn [req] | |
(println "force-login: ****** " req "******") | |
(if (or (= "/login" (:uri req)) (:user (:session req))) | |
(app req) | |
(resp/redirect "/login")))) |
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
/* | |
* jQuery Templating Plugin | |
* Copyright 2010, John Resig | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
*/ | |
(function (jQuery, undefined) { | |
var oldManip = jQuery.fn.domManip, tmplItmAtt = "_tmplitem", htmlExpr = /^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /, | |
newTmplItems = {}, wrappedItems = {}, appendToTmplItems, topTmplItem = { key: 0, data: {} }, itemKey = 0, cloneIndex = 0, stack = []; | |
function newTmplItem(options, parentItem, fn, 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
CLI commands for github API v3 (replace all CAPS keywords): | |
git init | |
git add . | |
git commit -am "initial commit" | |
curl -u 'USER:PASS' https://api.github.com/user/repos -d '{"name":"REPO"}' | |
git remote add origin git@github.com:USER/REPO.git | |
git push origin master |
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
brew install homebrew/dupes/apple-gcc42 | |
rbenv install 1.9.3-p484 | |
rbenv global 1.9.3-p484 | |
git clone https://github.com/cowboyd/libv8.git | |
cd libv8 | |
git checkout 3.11 | |
export CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 | |
export CXX=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 | |
export CPP=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2 | |
bundle install |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from abc import abstractmethod | |
from itertools import chain, imap | |
from typing import Any, Iterable | |
from typing import Callable, Generic, List | |
from typing import TypeVar | |
A = TypeVar('A') | |
B = TypeVar('B') | |
C = TypeVar('C') |
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
;; This are setting for nice tabbar items | |
;; to have an idea of what it looks like http://imgur.com/b0SNN | |
;; inspired by Amit Patel screenshot http://www.emacswiki.org/pics/static/NyanModeWithCustomBackground.png | |
;; Tabbar | |
(require 'tabbar) | |
;; Tabbar settings | |
(set-face-attribute | |
'tabbar-default nil | |
:background "gray20" |
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
cd ~/Library/Application\ Support/WebIde70/NativeNeighbourhood/classes/org/intellij/plugins/nativeNeighbourhood/icons/macosx | |
echo '#!/bin/sh | |
# | |
# Reveal a directory in the Terminal. | |
# | |
# The script takes one argument, the qualified name of a directory. | |
# | |
# Note that the script is necessary because osascript before osx 10.4 could not | |
# pass arguments. |
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
# On the phoenix node | |
# if production mode | |
MIX_ENV=prod PORT=4001 elixir --name phoenix@127.0.0.1 --cookie 123 --erl "-kernel inet_dist_listen_min 9001 inet_dist_listen_m 9001" -pa _build/prod/consolidated -S mix phoenix.server | |
# if debug mode | |
elixir --name phoenix@127.0.0.1 --cookie 123 --erl "-kernel inet_dist_listen_min 9001 inet_dist_listen_m 9001" -S mix phoenix.server | |
# On the observing node | |
# Terminal 1, start SSH tunnel | |
ssh -N -L 9001:localhost:9001 -L 4369:localhost:4369 pi@192.168.1.31 |
OlderNewer