Skip to content

Instantly share code, notes, and snippets.

@tasmo
tasmo / keybase.md
Created Oct 24, 2020
My Keybase proof
View keybase.md

Keybase proof

I hereby claim:

  • I am tasmo on github.
  • I am tomfreeze (https://keybase.io/tomfreeze) on keybase.
  • I have a public key ASBsDE7GYpL1Zlt7xOOGVwsBw8yd8SnyLdt2g8932NOUgQo

To claim this, I am signing this object:

@tasmo
tasmo / ec
Created Apr 25, 2017 — forked from alexmurray/ec
Start Emacs Client in GUI (and launch Emacs server if not already running)
View ec
#!/usr/bin/env bash
# Shamelessly taken from http://mjwall.com/blog/2013/10/04/how-i-use-emacs/
# This script starts emacs daemon if it is not running, opens whatever file
# you pass in and changes the focus to emacs. Without any arguments, it just
# opens the current buffer or *scratch* if nothing else is open. The following
# example will open ~/.bashrc
# ec ~/.bashrc
@tasmo
tasmo / .profile
Created Sep 23, 2016
snipped for ediff with emacsclient for POSIX shells
View .profile
### editor
export ALTERNATE_EDITOR=emacs
export EDITOR="emacsclient -tc -a emacs"
export VISUAL="emacsclient -c -a emacs"
# emacsclient as difftool
function ediff () {
if [ "X${2}" = "X" ]; then
echo "USAGE: ediff <FILE 1> <FILE 2>"
else
quoted1=${1//\\/\\\\}; quoted1=${quoted1//\"/\\\"}
@tasmo
tasmo / nightwatch failure.sh
Created May 18, 2016
.assert.containsText('.dropdown-menu .active a', '中文')
View nightwatch failure.sh
✔ Element <div.col-sm-6:nth-child(2) > a:nth-child(1)> was present after 107 milliseconds.
✔ Element <.btn-default> was present after 3470 milliseconds.
✔ Element <.dropdown-menu .active a span> was present after 37 milliseconds.
✖ Testing if element <.dropdown-menu .active a> contains text: "中文". - expected "中文" but got:
at Object.module.exports.test localhost (/Users/me/code/nightwatchjs/nightwatch/exist_test/ib.js:10:15)
at Module.call (/Users/me/code/nightwatchjs/nightwatch/lib/runner/module.js:63:34)
at /Users/me/code/nightwatchjs/nightwatch/lib/runner/testcase.js:97:29
at _fulfilled (/Users/me/code/nightwatchjs/nightwatch/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/Users/me/code/nightwatchjs/nightwatch/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/Users/me/code/nightwatchjs/nightwatch/node_modules/q/q.js:796:13)
@tasmo
tasmo / .htaccess
Created Sep 25, 2013
for installing Ghost in a subdomain @ Uberspace
View .htaccess
RewriteEngine On
RewriteBase /
RewriteRule (.*) http://localhost:2368/$1 [QSA,P]
View snippet.as
fscommand2("FullScreen", "true");
// Play/Pause;
var spaceKey:Object = {};
spaceKey.onKeyDown = function() {
trace(Key.getCode());
};
Key.addListener(spaceKey);