pan using zoom behaviour, unfortunately not very smooth
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
// ==UserScript== | |
// @name Lesschrome popup of HTML5 video | |
// @description Lesschrome popup window of the current url; ensure you uncheck "Always show the tab bar" in Firefox tab settings | |
// @include * | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
function obj_to_settingsstr (obj) { | |
var settingsstr = ""; |
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
#!/bin/bash | |
if [[ $# -lt 2 ]]; then | |
echo "Usage: $0 file1 file2 [additional options to diff]" | |
exit 1 | |
fi | |
if1=$1 | |
if2=$2 | |
shift 2 |
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
davs://poliveira@some.webserver.pt/webdav/someFolder |
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
#!/bin/sh | |
if test -f .merlin; then | |
echo ".merlin already exists, bailing out ..." >&2 | |
exit 1 | |
else | |
# You could add your default EXT's and such to this list: |
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
{-# LANGUAGE ForeignFunctionInterface #-} | |
module Adder where | |
import Foreign.C | |
adder :: CInt -> CInt -> IO CInt | |
adder x y = return $ x + y | |
foreign export ccall adder :: CInt -> CInt -> IO CInt |
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 function replaces all words in a buffer with words of the same length, | |
;; chosen at random from /usr/share/dict/words. Words are replaced consistently, | |
;; so e.g. "A" is always replaced with "Z". The mapping changes when Emacs is | |
;; restarted or when the cache buffer is killed. If all unique words of a certain | |
;; length are exhausted, random strings are used. | |
(defun ap/replace-words-randomly (&optional buffer) | |
"Replace all words in BUFFER or current buffer with randomly selected words from the dictionary. | |
Every time a new word is found, it is mapped to a replacement | |
word, so every instance of word A will be replaced with word Z." |
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
#!/bin/bash | |
run () { | |
signal-desktop & | |
disown | |
} | |
show () { | |
local -r id="$1" | |
idx="$(printf "0x%08x" "${id}")" |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# A SpaCy implementation of | |
# https://github.com/Babylonpartners/fastText_multilingual | |
# | |
# heavily based on | |
# https://github.com/Babylonpartners/fastText_multilingual/blob/master/align_your_own.ipynb | |
import numpy as np |