Skip to content

Instantly share code, notes, and snippets.


Sven Winkler svenwin

View GitHub Profile
svenwin / bb_reviews.js
Created Jan 23, 2018
Bitbucket Reviews
View bb_reviews.js
// ==UserScript==
// @name Bitbucket Approver
// @namespace
// @version 0.3.1
// @description Fades out already approved commits …
// @author Sven Winkler
// @include*
// @grant none
// @updateURL
// ==/UserScript==
svenwin / private.xml
Created Aug 19, 2016
Remap Lenovo USB to Mac
View private.xml
<?xml version="1.0"?>
<name>Lenovo USB for Mac</name>
<name>Remap CMD + Alt (sticky)</name>
<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 / 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"?>
<name>Medium for german keyboard layout</name>
<name>Make CMD+ALT+5,6 useable</name>
svenwin / SassMeister-input.scss
Created Oct 15, 2014
Generated by
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 / 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"?>
<name>SW: Avoid Terminal-RSI</name>
<appendix>Get two new big CTRL buttons for your thumbs</appendix>
<name>Swap Command_R with Control_R</name>
<autogen>--KeyToKey-- KeyCode::COMMAND_R, KeyCode::CONTROL_R</autogen>
View mvim.shellscript
# This shell script passes all its arguments to the binary inside the
# 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 / 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
git_bundles = [
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
View rake routes with url
rake routes | awk 'NR>1{gsub("^[^/]*", "");r[$1]=0} END{for(i in r)print i}' | sort