Skip to content

Instantly share code, notes, and snippets.

@dmedvinsky
dmedvinsky / domains
Last active April 24, 2018 09:08 — forked from mrPsycho/amazon
whitelist
fabric.io
maven.fabric.io
slack.com
zeplin.com
apple.com
trello.com
zeplin.io
hockeyapp.net
stadiumvpc-265910089.us-east-1.elb.amazonaws.com
sentry.io

Keybase proof

I hereby claim:

  • I am dmedvinsky on github.
  • I am dmedvinsky (https://keybase.io/dmedvinsky) on keybase.
  • I have a public key whose fingerprint is A58A 0259 0CC7 2810 04C9 B2A6 5739 66DE 005F 8442

To claim this, I am signing this object:

mkdir /tmp/test
cd /tmp/test
git init
git remote add origin git@host:test1.git
git remote set-url --add origin git@host:test2.git
touch file
git add file
git commit -m 'commit 1'
git push origin master
echo change 1.1 > file
@dmedvinsky
dmedvinsky / 01.configure
Created October 25, 2012 06:57
Homebank failed to build on 10.7.5
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/private/tmp/homebank-JM82/homebank-4.4/missing: Unknown `--run' option
Try `/private/tmp/homebank-JM82/homebank-4.4/missing --help' for more information
configure: WARNING: `missing' script is too old or missing
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
@dmedvinsky
dmedvinsky / filtermap.py
Created August 13, 2012 13:36
List comprehension, map-filter, custom loop, generator
from random import choice
from operator import methodcaller
l = []
for i in range(1000):
l.append(choice(['1', '10', '', ' ']))
def mapfilt(xs):
#!/bin/bash
test -n "$1" || exit 1
test -d "$1" || exit 1
cd "$1" || exit 1
max() {
if (($1 > $2)); then
echo $1
else
@dmedvinsky
dmedvinsky / align.rb
Created January 11, 2012 12:38
Earthquake Twitter client: align plugin
# -*- coding: utf-8 -*-
# align plugin
#
# For now only aligns usernames.
#
# Configure like this:
#
# Earthquake.config[:plugin_align] = {
# :name_maxlen => 10,
# :more_char => '…'
@dmedvinsky
dmedvinsky / test.hs
Created June 3, 2011 11:07
ios.e-legion.com test task
import Maybe
import Data.List
import Text.XML.Light
main :: IO()
main = readFile "test.xml" >>= putStrLn . solve
solve :: String -> String
solve = formatResult . getTotal . reduce . getList
@dmedvinsky
dmedvinsky / xwrits-lock-hooks.diff
Created September 1, 2010 10:10
Adds ability to execute sh scripts in xwrits before lock and after unlock.
diff -u xwrits-2.26//main.c xwrits/main.c
--- xwrits-2.26//main.c 2009-04-04 01:17:02.000000000 +0400
+++ xwrits/main.c 2010-09-01 14:06:52.531052264 +0400
@@ -10,6 +10,7 @@
#ifdef HAVE_XINERAMA
#include <X11/extensions/Xinerama.h>
#endif
+#include <signal.h>
static Options onormal;