Skip to content

Instantly share code, notes, and snippets.

*.pbxproj -crlf -diff -merge
@vanmik
vanmik / gist:580136
Created September 15, 2010 02:16
applescript allows to insert custom text in any os x app
-- 'selection' work in Pages.app only
tell application "Pages"
set selText to selection
end tell
tell me
activate
display dialog "Type a tag" default answer ""
set the_text to the text returned of result
end tell
@vanmik
vanmik / gist:1413402
Created December 1, 2011 03:51
make rm() move files to Trash
function rm () {
local path
for path in "$@"; do
# ignore any arguments
if [[ "$path" = -* ]]; then :
else
local dst=${path##*/}
# append the time if necessary
while [ -e ~/.Trash/"$dst" ]; do
dst="$dst "$(date +%H-%M-%S)
// source: ISO 3166-2:RU (http://en.wikipedia.org/wiki/ISO_3166-2:RU)
var RU_SUBDIVISIONS_CODES = {
// Области
AMU: 'Амурская область',
ARK: 'Архангельская область',
AST: 'Астраханская область',
BEL: 'Белгородская область',
BRY: 'Брянская область',
@vanmik
vanmik / template_matching.py
Last active May 18, 2019 09:38
template_matching example
import os
import shutil
import numpy as np
import argparse
import imutils
import glob
import cv2
template = cv2.imread('logo_with_title.png')