Skip to content

Instantly share code, notes, and snippets.

View morhetz's full-sized avatar

Pavel Pertsev morhetz

View GitHub Profile
@morhetz
morhetz / curl.cmd
Created April 6, 2011 00:41
Just put it to your "Git\cmd" directory
@rem Do not use "echo off" to not affect any child calls.
@setlocal
@rem Get the abolute path to the parent directory, which is assumed to be the
@rem Git installation root.
@for /F "delims=" %%I in ("%~dp0..") do @set git_install_root=%%~fI
@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%PATH%
@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
@if not exist "%HOME%" @set HOME=%USERPROFILE%
@morhetz
morhetz / slim-html5-boilerplate.slim
Created November 11, 2012 02:52
Slim HTML5 Boilerplate
doctype html
/[if lt IE 7]
html.no-js.lt-ie9.lt-ie8.lt-ie7
/[if IE 7]
html.no-js.lt-ie9.lt-ie8
/[if IE 8]
html.no-js.lt-ie9
/![if gt IE 8]><!
html.no-js
@morhetz
morhetz / better-typist.ahk
Created December 13, 2012 19:28
Force hand alteration with Shift, Control and Alt
; -----------------------------------------------------------------------------
; File: better-typist.ahk
; Description: Force hand alteration with Shift, Control and Alt
; Author: morhetz <morhetz@gmail.com>
; Last Modified: 13 Dec 2012
; -----------------------------------------------------------------------------
keysLeft := "q*w*e*r*t*a*s*d*f*g*z*x*c*v*b"
keysRight := "y*u*i*o*p*[*]*\*h*j*k*l*;*'*n*m*,*.*/"
function! gruvbox#hls_show()
set hlsearch
call s:HL('Cursor', 'dark0', 'orange')
call s:HL('vCursor', 'dark0', 'orange')
call s:HL('iCursor', 'dark0', 'orange')
call s:HL('lCursor', 'dark0', 'orange')
endfunction
function! gruvbox#hls_hide()
set nohlsearch
map <silent> <F4> :call gruvbox#hls_toggle()<CR>
imap <silent> <F4> <ESC>:call gruvbox#hls_toggle()<CR>a
vmap <silent> <F4> <ESC>:call gruvbox#hls_toggle()<CR>gv
nnoremap <silent> <CR> :call gruvbox#hls_hide()<CR><CR>
nnoremap * :let @/ = ""<CR>:call gruvbox#hls_show()<CR>*
nnoremap / :let @/ = ""<CR>:call gruvbox#hls_show()<CR>/
nnoremap ? :let @/ = ""<CR>:call gruvbox#hls_show()<CR>?
#!/bin/bash
if [[ "$TERM" == "screen" || "$TERM" == "screen-256color" ]]; then
echo -ne "\eP\e]4;235;rgb:28/28/28\a\e\\"
echo -ne "\eP\e]4;237;rgb:3c/38/36\a\e\\"
echo -ne "\eP\e]4;239;rgb:50/49/45\a\e\\"
echo -ne "\eP\e]4;241;rgb:66/5c/54\a\e\\"
echo -ne "\eP\e]4;243;rgb:7c/6f/64\a\e\\"
echo -ne "\eP\e]4;244;rgb:92/83/74\a\e\\"
@morhetz
morhetz / gruvbox_256palette_ksl.sh
Created August 29, 2014 10:04
gruvbox_256palette-konsole
#!/bin/sh
if [ "${TERM%%-*}" = "screen" ]; then
if [ -n "$TMUX" ]; then
printf "\033Ptmux;\033\033]4;236;rgb:32/30/2f\007\007"
printf "\033Ptmux;\033\033]4;234;rgb:1d/20/21\007\007"
printf "\033Ptmux;\033\033]4;235;rgb:28/28/28\007\007"
printf "\033Ptmux;\033\033]4;237;rgb:3c/38/36\007\007"
printf "\033Ptmux;\033\033]4;239;rgb:50/49/45\007\007"
@morhetz
morhetz / kwmrc
Created February 20, 2016 03:14
# Set default values for screen padding
kwmc config padding top 40
kwmc config padding bottom 30
kwmc config padding left 30
kwmc config padding right 30
# Set default values for container gaps
kwmc config gap vertical 20
kwmc config gap horizontal 20
.image {
background: set('/images/icons/baz.jpg') at-4x;
}
/* ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ */
.image {
background: url('/images/icons/baz@1x.jpg');
}
require('require-yaml')
process.env.TARGET = process.env.TARGET || process.env.NODE_ENV || 'production'
function getYml(path) {
/* eslint-disable */
let yml = {}
try {
yml = require(path)
} catch (e) {