Skip to content

Instantly share code, notes, and snippets.

View obfusk's full-sized avatar
🏳️‍🌈
hacking ⇒ ¬sleeping 😸

FC (Fay) Stegerman obfusk

🏳️‍🌈
hacking ⇒ ¬sleeping 😸
View GitHub Profile
@obfusk
obfusk / README.md
Last active December 14, 2015 14:49
grub2 password protection

To generate a password:

$ grub-mkpasswd-pbkdf2

Now use the diff as a guideline to modify /etc/grub.d/.

NB: I've only modified the files I needed to; depending on your configuration you may need to modify additional menuentry and submenu entries in other files.

@obfusk
obfusk / gists.rb
Last active December 15, 2015 03:49
list github repos and gists (w/ desc, home, branches)
#!/usr/bin/ruby
require 'io/console'
require 'json'
require 'open-uri'
# --
pag = ->(data; l, n, r) {
(l = data.meta['link']) &&
@obfusk
obfusk / ssh_config
Created March 20, 2013 10:45
fix github ssh connection problems
Host *.github.com
ConnectTimeout 120
ConnectionAttempts 10
@obfusk
obfusk / profile
Created April 4, 2013 21:02
umask
# MODIFIED {
umask 077
# } MODIFIED
@obfusk
obfusk / sshd_config.diff
Created April 4, 2013 21:03
secure ssh
--- /etc/ssh/sshd_config.original 2013-04-04 22:52:18.684167049 +0200
+++ /etc/ssh/sshd_config 2013-04-04 22:52:55.284348534 +0200
@@ -24,7 +24,8 @@
# Authentication:
LoginGraceTime 120
-PermitRootLogin yes
+# PermitRootLogin yes
+PermitRootLogin no
StrictModes yes
@obfusk
obfusk / 99-felix-android.rules
Last active December 15, 2015 19:58
phonegap/android development (on ubuntu 12.04 amd64)
# Nexus 7
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", \
MODE="0660", GROUP="adbusers", \
SYMLINK+="android_adb android_fastboot"
@obfusk
obfusk / ua.md
Last active December 15, 2015 20:59
User Agents

Chromium (2013-04-04 snapshot, Ubuntu)

Mozilla/5.0 (X11; Linux x86_64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1466.0 Safari/537.36

Firefox 20.0 (Ubuntu)

Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0

Midori 0.4.3 (Ubuntu)

@obfusk
obfusk / README.md
Last active December 15, 2015 22:28
phonegap barcode lib

Library

android update project --path ./ --library ./phonegap-plugins/Android/BarcodeScanner/2.2.0/LibraryProject

pushd phonegap-plugins/Android/BarcodeScanner/2.2.0/LibraryProject
android update project --path ./ --target android-17
popd

Java

@obfusk
obfusk / git.sh
Last active December 16, 2015 07:29
pretty git log with graph
$ git log --graph --decorate --oneline --abbrev-commit --all
$ map 'cd $it; pwd; git log --graph --decorate --oneline --abbrev-commit --all --color=always; echo' * 2>&1 | less -R
$ mgit F . log --graph --decorate --pretty=oneline --abbrev-commit --all --color=always | less -R
@obfusk
obfusk / foo.gemspec
Created April 18, 2013 19:20
gemspec example
require File.expand_path('../lib/foo/version', __FILE__)
Gem::Specification.new do |s|
s.name = 'foo'
s.summary = '...'
s.version = Foo::VERSION
s.date = Foo::DATE
s.authors = [ 'Felix C. Stegerman' ]