Skip to content

Instantly share code, notes, and snippets.

Find identifier for mouse

xinput list
sudo nano /usr/share/X11/xorg.conf.d/20-mouse.conf

paste, using device identifier from before

change/method_profiler
dtrace

Can use cvt to calculate the values and provide them to xrandr

cvt 1600 900 60

Or just copy paste this for 1600x900

sudo xrandr --newmode "1600x900_60.00"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync
sudo xrandr --addmode eDP-1 1600x900_60.00

Include this in .bashrc to ensure shims are on the PATH.

export PATH="$HOME/.ndenv/bin:$HOME/.ndenv/shims:$PATH"

@nickbrowne
nickbrowne / nomiddleclick.md
Last active February 6, 2017 02:30
Disable middle click titlebar for Ubuntu MATE

dconf-editor

Look for org.marco.general.action-middle-click-titlebar and set to 'none'

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install xserver-xorg-video-intel
@nickbrowne
nickbrowne / turbodev.rb
Created February 23, 2016 05:14
Reminder to try TurboDev from discourse
module Middleware
# Cheat and bypass Rails in development mode if the client attempts to download a static asset
# that's already been downloaded.
#
# Also ensures that assets are not cached in development mode. Around Chrome 29, the behavior
# of `must-revalidate` changed and would often not request assets that had changed.
#
# To use, include in your project and add the following to development.rb:
#
trap(:USR2) {
  Thread.list.each do |t|
    puts "#" * 90
    p t
    puts t.backtrace
    puts "#" * 90
  end
}
@nickbrowne
nickbrowne / vidtogif
Created February 5, 2016 06:03
a quick and dirty video to gif converter
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
def filename
ARGV[0].rpartition('.').first
end
`ffmpeg -i #{ARGV[0]} -vf scale=320:-1 -f image2pipe -vcodec ppm - | convert -layers Optimize -delay 5 -loop 0 - #{filename}.gif`

Select the verts, press P

Separate by selection

Select child, then parent, CTRL+P, keep transform