Skip to content

Instantly share code, notes, and snippets.

@andreipak
andreipak / AutoHotkey.ahk
Last active December 11, 2015 10:18
AutoHotkey Config file for Win8 under VMWare Fusion
; AutoHotkey Config file for Win8 under VWWare Fusion
; revision: 20151211
; wget https://gist.githubusercontent.com/andreipak/a525267a58c29581e17c/raw --no-check-certificate -O C:\Users\apak\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\AutoHotkey.ahk
;Ctrl-] to Escape
^[::
SetKeyDelay, 10, 10
Send {Escape}
return
End of Line Character Test
Which do you like CR LF or LF?
This file uses "CR LF"!!!!
Clone me!
@andreipak
andreipak / server.py
Last active August 29, 2015 14:16 — forked from tsuna/server.py
#!/usr/bin/python
# A simple example of a threaded TCP server in Python.
#
# Copyright (c) 2012 Benoit Sigoure All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright notice,
@andreipak
andreipak / .zshrc
Last active August 29, 2015 14:16 — forked from aurbano/.zshrc
# start_time="$(date +%s)"
# Antigen — A zsh plugin manager
export ANTIGEN_DEFAULT_REPO_URL=https://github.com/sharat87/oh-my-zsh.git
source ~/antigen.zsh
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
# Bundles from the default repo declared above.
---
- hosts: alpine_install
user: root
tasks:
# - name: create a complete empty file
# command: /usr/bin/touch /test/test.conf
- name: create a new file with lineinfile
lineinfile: dest=/test/test.conf
" normally placed: ~/
execute pathogen#infect()
filetype plugin indent on
"Set leaderkey
let mapleader = ","
"Disable beep and flash
set noerrorbells
if has("gui_macvim")
set transparency=15 " Makes the background window 85% opaque
set guifont=Monaco:h10 " Monaco 10 is my favorite font
set noantialias " Especially when it isn't aliased
map <SwipeLeft> :bprev<CR> " Swipe left opens a previous hidden buffer
map <SwipeRight> :bnext<CR> " Swipe right opens the next hidden buffer
endif
@andreipak
andreipak / pv_tar_and_gzip.sh
Created November 13, 2014 15:03
pv tar and gzip
tar cf - /home/git/repositories -P | pv -s $(du -sb /home/git/repositories | awk '{print $1}') | gzip > repos_all.tar.gz
# 993MB 0:00:50 [22.1MB/s] [==============================================================> ] 49% ETA 0:00:51
user www-data;
# As a thumb rule: One per CPU. If you are serving a large amount
# of static files, which requires blocking disk reads, you may want
# to increase this from the number of cpu_cores available on your
# system.
#
# The maximum number of connections for Nginx is calculated by:
# max_clients = worker_processes * worker_connections
worker_processes 1;
@andreipak
andreipak / display_order.desktop
Last active August 29, 2015 14:08
display_order - set display order (fix for nvidia proprietary drivers)
[Desktop Entry]
Type=Application
Exec=/home/apak/bin/display_order.sh
Hidden=true
NoDisplay=true
X-GNOME-Autostart-enabled=true
Name[en_US]=display_order
Name=display_order
Comment[en_US]=Set Display Order
Comment=Set Display Order