Skip to content

Instantly share code, notes, and snippets.

Sven Winkler svenwin

View GitHub Profile
@svenwin
svenwin / bb_reviews.js
Created Jan 23, 2018
Bitbucket Reviews
View bb_reviews.js
// ==UserScript==
// @name Bitbucket Approver
// @namespace http://tampermonkey.net/
// @version 0.3.1
// @description Fades out already approved commits …
// @author Sven Winkler
// @include https://bitbucket.org/*
// @grant none
// @updateURL https://gist.githubusercontent.com/svenwin/f89d122680e452e6ab24ae27ded589e3/raw
// ==/UserScript==
@svenwin
svenwin / private.xml
Created Aug 19, 2016
Remap Lenovo USB to Mac
View private.xml
<?xml version="1.0"?>
<root>
<item>
<name>Lenovo USB for Mac</name>
<item>
<name>Remap CMD + Alt (sticky)</name>
<identifier>remap.print_to_option_r</identifier>
<device_only>DeviceVendor::RawValue::0x17ef, DeviceProduct::RawValue::0x6047</device_only>
<autogen>__KeyOverlaidModifier__ KeyCode::OPTION_R, KeyCode::COMMAND_R, KeyCode::VK_STICKY_ACTIVE_MODIFIERS_FORCE_ON, KeyCode::VK_STICKY_COMMAND_R</autogen>
<autogen>__KeyOverlaidModifier__ KeyCode::F13, KeyCode::OPTION_R, KeyCode::VK_STICKY_ACTIVE_MODIFIERS_FORCE_ON, KeyCode::VK_STICKY_OPTION_R</autogen>
@svenwin
svenwin / medium.xml
Last active Jul 15, 2016
Make medium shortcuts ⌘⌥5 and ⌘⌥6 usable on a german keyboard layout
View medium.xml
<?xml version="1.0"?>
<root>
<item>
<name>Medium for german keyboard layout</name>
<item>
<name>Make CMD+ALT+5,6 useable</name>
<only>GOOGLE_CHROME</only>
<identifier>remap.medium_keys</identifier>
<autogen>__KeyToKey__ KeyCode::5, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_COMMAND | MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_OPTION, KeyCode::KEYPAD_5, ModifierFlag::OPTION_L, ModifierFlag::COMMAND_L</autogen>
<autogen>__KeyToKey__ KeyCode::6, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_COMMAND | MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_OPTION, KeyCode::KEYPAD_6, ModifierFlag::OPTION_L, ModifierFlag::COMMAND_L</autogen>
@svenwin
svenwin / SassMeister-input.scss
Created Oct 15, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.5)
// Compass (v1.0.1)
// ----
@mixin honk($important:null) {
@if $important == true
{ $important: !important }
color: green $important;
}
@svenwin
svenwin / cmd_to_ctrl.xml
Last active Dec 10, 2015
KeyRemap private.xml Switch Cmd to Ctrl on Terminal
View cmd_to_ctrl.xml
<?xml version="1.0"?>
<root>
<item>
<name>SW: Avoid Terminal-RSI</name>
<appendix>Get two new big CTRL buttons for your thumbs</appendix>
<item>
<name>Swap Command_R with Control_R</name>
<identifier>remap.app_terminal_commandR2controlR</identifier>
<only>TERMINAL</only>
<autogen>--KeyToKey-- KeyCode::COMMAND_R, KeyCode::CONTROL_R</autogen>
View mvim.shellscript
#!/bin/sh
#
# This shell script passes all its arguments to the binary inside the
# MacVim.app application bundle. If you make links to this script as view,
# gvim, etc., then it will peek at the name used to call it and set options
# appropriately.
#
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico
# Weber and Bjorn Winckler, Aug 13 2007).
@svenwin
svenwin / rvm_after_cd_hook_bundle_exec
Created Sep 3, 2011
RVM after_cd hook for bundle exec
View rvm_after_cd_hook_bundle_exec
# you will need to "export rvm_verbose_flag=" after using "rvm use" to shutup verbose Hook message
path_prepend () { path_remove $1; export PATH="$1:$PATH"; }
path_remove () { export PATH=`echo -n $PATH | awk -v RS=: -v ORS=: '$0 != "'$1'"' | sed 's/:$//'`; }
if [[ -f "Gemfile" && -d "bin" ]]; then
[ ! -z "$gemfiled_project_path" ] && path_remove ${gemfiled_project_path}/bin
export gemfiled_project_path=`pwd`
path_prepend ${gemfiled_project_path}/bin
echo "Bundler binstubs is in $gemfiled_project_path/bin" 1>&2
View update_bundles
#!/usr/bin/env ruby
# in reference to http://tammersaleh.com/posts/the-modern-vim-config-with-pathogen
git_bundles = [
"git://github.com/astashov/vim-ruby-debugger.git",
"git://github.com/msanders/snipmate.vim.git",
"git://github.com/scrooloose/nerdtree.git",
"git://github.com/timcharper/textile.vim.git",
"git://github.com/tpope/vim-cucumber.git",
"git://github.com/tpope/vim-fugitive.git",
@svenwin
svenwin / clean_close.vim
Created May 12, 2011
vim clean close, preserve my splits
View clean_close.vim
map fc <Esc>:call CleanClose()
function! CleanClose()
let todelbufNr = bufnr("%")
let newbufNr = bufnr("#")
if ((newbufNr != -1) && (newbufNr != todelbufNr) && buflisted(newbufNr))
exe "b".newbufNr
else
bnext
endif
View rake routes with url
rake routes | awk 'NR>1{gsub("^[^/]*", "");r[$1]=0} END{for(i in r)print i}' | sort
You can’t perform that action at this time.