Skip to content

Instantly share code, notes, and snippets.

## Load smart urls if available
# bracketed-paste-magic is known buggy in zsh 5.1.1 (only), so skip it there; see #4434
autoload -Uz is-at-least
if [[ $ZSH_VERSION != 5.1.1 ]]; then
for d in $fpath; do
if [[ -e "$d/url-quote-magic" ]]; then
if is-at-least 5.1; then
autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic
fi
local application = require "mjolnir.application"
local hotkey = require "mjolnir.hotkey"
local window = require "mjolnir.window"
local fnutils = require "mjolnir.fnutils"
-- Set up hotkey combinations
local cmct = {"cmd", "ctrl"}
function switch_fun(name)
local first_attempt = application.launchorfocus(name)
@Zert
Zert / t.tex
Last active March 17, 2016 16:48
\documentclass{article}
\usepackage[utf8]{inputenc} %% 1
\usepackage[T2A]{fontenc} %% 2
\usepackage[russian]{babel} %% 3
\begin{document}
Это очень длинный текст с переносами. Возможно переносы будут, возможно нет, не узнаешь, пока не скомпилируешь.
\end{document}
#!/usr/bin/env python
import types
class Base(object):
def __init__(self):
self.v = 5
def m(self):
@Zert
Zert / -
Created December 29, 2013 04:51
-> % rust pkg install github.com/wycats/rust-activesupport
/Users/zert/Work/Rust/.rust/src/github.com/wycats/rust-activesupport-0.1/time.rs:45:14: 45:17 error: found `self` in ident position
/Users/zert/Work/Rust/.rust/src/github.com/wycats/rust-activesupport-0.1/time.rs:45 pub fn year(mut self, year: int) -> Time {
^~~
/Users/zert/Work/Rust/.rust/src/github.com/wycats/rust-activesupport-0.1/time.rs:45:22: 45:23 error: expected `:` but found `,`
/Users/zert/Work/Rust/.rust/src/github.com/wycats/rust-activesupport-0.1/time.rs:45 pub fn year(mut self, year: int) -> Time {
^
task <unnamed> failed at 'explicit failure', /private/tmp/rust-u62U/rust-0.8/src/libsyntax/diagnostic.rs:72
task <unnamed> failed at 'receiving on closed channel', /private/tmp/rust-u62U/rust-0.8/src/libstd/rt/comm.rs:188
-module (cowbug_handler).
-export([start/0]).
-export([init/3, handle/2, terminate/3]).
start() ->
[application:start(A) ||
A <-
[
-> % echo 'adsd werwer' | sed 's/[:space:]+/,/g'
adsd werwer
zert@uranium [03:57:06] [~/Music/Orbital Discography]
-> % ls -l
total 0
drwxrwxrwx 24 zert staff 816 Oct 15 00:17 Albums
drwxrwxrwx 21 zert staff 714 Oct 14 23:51 Foto
drwxrwxrwx 44 zert staff 1496 Oct 15 00:07 Singles and EPs
zert@uranium [03:57:19] [~/Music/Orbital Discography]
-> % find . -name '*.flac' | head
./Albums/1991 - Orbital - Orbital (EU Green Album - 8282482)/01 - The Moebius.flac
./Albums/1991 - Orbital - Orbital (EU Green Album - 8282482)/02 - Speed Freak.flac
@Zert
Zert / .slate
Created December 19, 2013 12:18
# This is the default .slate file.
# If no ~/.slate file exists this is the file that will be used.
config defaultToCurrentScreen true
#config nudgePercentOf screenSize
#config resizePercentOf screenSize
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
config windowHintsSpread true
config windowHintsSpreadSearchWidth 100
PLT_NAME=.projectname_dialyzer.plt
$(PLT_NAME):
@ERL_LIBS=../erllib/deps dialyzer --build_plt --output_plt $(PLT_NAME) \
--apps erts kernel stdlib sasl crypto lager jiffy \
amqp_client rabbit_common || true
dialyze: $(PLT_NAME)
@dialyzer apps/projectname/ebin --plt $(PLT_NAME) --no_native \
-Werror_handling -Wunderspecs -Wrace_conditions