Skip to content

Instantly share code, notes, and snippets.

@RoryDungan
RoryDungan / mouse.sh
Created Jan 4, 2016
Fix crazy fast cursor movement with Razer DeathAdder mouse on Ubuntu
View mouse.sh
#!/bin/bash
xinput list |
grep -E 'DeathAdder.*pointer' |
awk -F"=" '{print $2}' |
awk '{print $1}' |
while read -r id
do
xinput --set-prop $id "Device Accel Constant Deceleration" 3
xinput --set-prop $id "Device Accel Velocity Scaling" 1
done
View .vimrc
" Indentation
set smartindent
" set tabstop=2
" set shiftwidth=2
set tabstop=4
set shiftwidth=4
set expandtab
set autoindent
" Enable autocompletion for file paths
View Preferences.sublime-settings
{
"added_words":
[
"favourite"
],
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"ignored_packages":
[
],
View Internal-DeferredShading.shader
Shader "Custom/Internal-DeferredShading" {
Properties {
_LightTexture0 ("", any) = "" {}
_LightTextureB0 ("", 2D) = "" {}
_ShadowMapTexture ("", any) = "" {}
_SrcBlend ("", Float) = 1
_DstBlend ("", Float) = 1
}
SubShader {
View .tmux.conf
set-option -g default-shell /usr/bin/fish
set -s escape-time 1
set -g prefix C-v
setw -g mode-keys vi
set-option -g base-index 1
setw -g pane-base-index 1
View .gitconfig windows cygwin
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
[user]
name = Rory Dungan
email =
[diff]
tool = winmerge
[difftool "winmerge"]
View .minttyrc
BoldAsFont=-1
Font=Consolas
FontHeight=11
Transparency=off
Term=xterm-256color
CursorType=block
Scrollbar=none
Locale=en_AU
Charset=UTF-8
View Knight.hs
import Control.Monad
type KnightPos = (Int, Int)
moveKnight :: KnightPos -> [KnightPos]
moveKnight (c,r) = do
(c',r') <- [(c+2,r-1), (c+2,r+1), (c-2,r+1), (c-2,r-1)
,(c+1,r-2), (c+1,r+2), (c-1,r+2), (c-1,r-2)
]
guard (c' `elem` [1..8] && r' `elem` [1..8])
View User Settings.json
{
"workbench.activityBar.visible": true,
"editor.wordWrap": "off",
"editor.minimap.enabled": true,
"editor.minimap.renderCharacters": false,
//**/
"editor.fontFamily": "Fira Code",
"editor.fontSize": 14.5,
"editor.letterSpacing": -0.7,
"workbench.colorTheme": "One Dark Pro",
View PropertyChangedExample.cs
[Binding]
public class PropertyChangedExample : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
private void OnPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));