Skip to content

Instantly share code, notes, and snippets.

View asciidiego's full-sized avatar
🎄

Diego Rodriguez asciidiego

🎄
View GitHub Profile
@shawwn
shawwn / since2010.md
Created May 11, 2021 09:46
"What happened after 2010?"

This was a response to a Hacker News comment asking me what I've been up to since 2010. I'm posting it here since HN rejects it with "that comment is too long." I suppose that's fair, since this ended up being something of an autobiography.

--

What happened after 2010?

@shiv19
shiv19 / getNavBarHeight.js
Created January 6, 2019 21:56
Get Android Navigation bar height NativeScript
function getNavBarHeight() {
const app = require("application");
if (app.android) {
let navBarHeight = 0;
let windowManager = app.android.context
.getSystemService(android.content.Context.WINDOW_SERVICE);
let d = windowManager.getDefaultDisplay();
let realDisplayMetrics = new android.util.DisplayMetrics();
d.getRealMetrics(realDisplayMetrics);

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@jacobsalmela
jacobsalmela / nc-reverse-shell.sh
Created August 13, 2014 12:37
(OS X) Reverse shell via netcat
#!/bin/bash
#----------AUTHOR------------
# Jacob Salmela
# 9 April 2013
#---------DESCRIPTION--------
# Serves up an unencrypted, reverse-shell when the -e option is unavailable
# Much less reliable (command lag), but useful in a pinch
#----------FUNCTIONS---------
@quux00
quux00 / override-paredit-keybindings.el
Created August 18, 2012 00:17
Emacs: override paredit keybindings
;; override the default keybindings in paredit
(eval-after-load 'paredit
'(progn
(define-key paredit-mode-map (kbd "<M-right>") 'paredit-forward-slurp-sexp)
(define-key paredit-mode-map (kbd "<M-left>") 'paredit-forward-barf-sexp)
(define-key paredit-mode-map (kbd "<C-right>") nil)
(define-key paredit-mode-map (kbd "<C-left>") nil)))