Skip to content

Instantly share code, notes, and snippets.

@rgo
rgo / gist:2025990
Created March 13, 2012 01:16
Gnome-shell dual monitor separate workspaces
# By default the behavior is:
# Primary monitor work as always and second monitor only have one and fixed workspace
# I.e. you change to next workspace, primary monitor change to this workspace and second monitor remain as is.
# The desired behaviour is:
# Primary monitor and secondary monitor are linked workspace.
# I.e. you change to next workspace, primary monitor change to this workspace and second monitor too.
$ gconf-editor
# Look for /desktop/gnome/shell/windows/workspaces_only_on_primary and set to false
@rgo
rgo / gist:1324325
Created October 29, 2011 10:36
Convert files to utf-8 with vim
## From http://stackoverflow.com/questions/2311750/change-file-encoding-to-utf-8-via-vim-in-a-script
#This is the simplest way I know of to do this easily from the command line:
vim +"argdo se bomb | se fileencoding=utf-8 | w" $(find . -type f -name *.rb)
#Or better yet if the number of files is expected to be pretty large:
find . -type f -name *.rb | xargs vim +"argdo se bomb | se fileencoding=utf-8 | w"
@rgo
rgo / capistrano_db_dump_and_clone_to_local.rb
Created March 1, 2010 12:04
Capistrano: Dump and clone to local database
# Directly copied from eycap-0.5.2 (thanks!)
#
# With these tasks you can:
# - dump your production database and save it in shared_path/db_backups
# - dump your production into your local database (clone_to_local)
#
# Tested and fixed by fjguzman
Capistrano::Configuration.instance(:must_exist).load do
namespace :db do

Keybase proof

I hereby claim:

  • I am rgo on github.
  • I am leptom (https://keybase.io/leptom) on keybase.
  • I have a public key ASB3hSxcjcD2PAGIEJjhBcj9F67TfK5nUJugpC_A0kQqRAo

To claim this, I am signing this object:

@rgo
rgo / change_dpi_gnome_shell.sh
Created February 22, 2018 11:07
Change DPI in gnome-shell
gsettings set org.gnome.desktop.interface text-scaling-factor 1.2188
xrdb -q | grep dpi
./darktable-cli ~/Pictures/dt-test/bench.SRW test.jpg --core -d perf -d opencl
(process:48734): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
[opencl_init] opencl related configuration options:
[opencl_init]
[opencl_init] opencl: 1
[opencl_init] opencl_library: ''
[opencl_init] opencl_memory_requirement: 768
[opencl_init] opencl_memory_headroom: 300
@rgo
rgo / kernel_module.sh
Created November 4, 2017 22:34 — forked from probonopd/kernel_module.sh
Trying to compile kernel module for Ralink 3070 chipset
#
# Trying to compile kernel module for Ralink 3070 chipset
# with patch described on
# http://www.geekamole.com/2013/rt2800usb-fix-for-ralinkmediatek-3070-gentoo-linux/
#
apt-get install linux-headers-3.7-trunk-686-pae # This is on Kali Linux; 3 MB
apt-get install linux-source-3.7 # http://ftp.halifax.rwth-aachen.de/kali/pool/main/l/linux-kali/linux-source-3.7_3.7.2-0+kali8_all.deb # 82 MB
tar xfj /usr/src/linux-source-3.7.tar.bz2
cd linux-*
@rgo
rgo / darktable.rb
Last active May 5, 2017 13:18
Darktable homebrew formula
class Darktable < Formula
desc 'Photography workflow application and raw developer'
homepage 'https://www.darktable.org/'
url 'https://github.com/darktable-org/darktable/releases/download/release-2.2.4/darktable-2.2.4.tar.xz'
version '2.2.4'
sha256 'bd5445d6b81fc3288fb07362870e24bb0b5378cacad2c6e6602e32de676bf9d8'
needs :openmp
depends_on 'cmake' => :build
@rgo
rgo / gist:7e1847d7c10ee43fa5de012d5a268a48
Created September 22, 2016 11:54 — forked from sgergely/gist:3793166
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
@rgo
rgo / .vimrc
Created September 22, 2016 10:46 — forked from fxn/.vimrc
function! s:EnableRelativeNumber()
set nonumber
set relativenumber
endfunction
function! s:DisableRelativeNumber()
set norelativenumber
set number
endfunction