start new:
tmux
start new with session name:
tmux new -s myname
| {-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving #-} | |
| {-# LANGUAGE FlexibleContexts, FlexibleInstances, TemplateHaskell, OverloadedStrings #-} | |
| {-# LANGUAGE GADTs, MultiParamTypeClasses, TypeSynonymInstances #-} | |
| import Data.Text (Text) | |
| import Data.ByteString (ByteString) | |
| import Database.Persist.Sqlite | |
| import Control.Monad.Logger (runStderrLoggingT) | |
| import Yesod | |
| import Yesod.Auth |
| ;; -*- mode: emacs-lisp -*- | |
| ;; This file is loaded by Spacemacs at startup. | |
| ;; It must be stored in your home directory. | |
| (defun dotspacemacs/layers () | |
| "Configuration Layers declaration." | |
| (setq-default | |
| ;; List of additional paths where to look for configuration layers. | |
| ;; Paths must have a trailing slash (i.e. `~/.mycontribs/') | |
| dotspacemacs-configuration-layer-path '() |
| formlyConfig.setType({ | |
| name: 'angucomplete-remote', | |
| //template: '<input show-weeks="false" class="form-control" min-date="to.minDate" ng-model="model[options.key]" is-open="to.isOpen" datepicker-options="to.datepickerOptions" />', | |
| template: '<angucomplete-alt id="{{to.id}}" placeholder="{{to.placeholder}}" pause="{{to.pause}}" selected-object="model[options.key]" remote-url="'+endpoint+'{{to.url}}" '+ | |
| 'description-field="{{to.label}}" search-fields="{{to.searchField}}" text-no-results="{{to.textNoResults}}" input-class="form-control form-control-small" title-field="{{to.titleField}}" match-class="{{to.matchClass}}" text-searching="{{to.textSearching}}"/>', | |
| //templateUrl: 'datepicker.html', | |
| wrapper: ['bootstrapLabel', 'bootstrapHasError'], | |
| defaultOptions: { | |
| ngModelAttrs: ngModelAttrs, | |
| templateOptions: { |
| #!/usr/bin/env bash | |
| if [ "$#" -ge 2 ] | |
| then | |
| DBNAME="$1"; shift | |
| PREFIX="$1"; shift | |
| else | |
| echo "usage: mysql-dump-like.sh <database> <table_prefix> [<mysql_options...>]" | |
| exit 1 | |
| fi |
| wget http://www.stackage.org/lts/cabal.config | |
| cabal update | |
| cabal sandbox init | |
| cabal install alex happy yesod-bin | |
| export PATH=./.cabal-sandbox/bin:$PATH | |
| yesod init --bare | |
| cabal install -j --enable-tests --max-backjumps=-1 --reorder-goals | |
| yesod devel |
| (function (dust) { | |
| /** | |
| * Polyfill to create String.trim() if it's not natively available | |
| */ | |
| if (!String.prototype.trim) { | |
| (function(){ | |
| // Make sure we trim BOM and NBSP | |
| var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; | |
| String.prototype.trim = function () { |
| sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common | |
| sudo apt-get build-dep vim-gnome | |
| sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev | |
| sudo rm -rf /usr/local/share/vim | |
| sudo rm /usr/bin/vim | |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
| #!/usr/bin/env php | |
| <?php | |
| function wsse_header($username, $password) { | |
| $nonce = hash_hmac('sha512', uniqid(null, true), uniqid(), true); | |
| $created = new DateTime('now', new DateTimezone('UTC')); | |
| $created = $created->format(DateTime::ISO8601); | |
| $digest = sha1($nonce.$created.$password, true); | |
| return sprintf( |