Skip to content

Instantly share code, notes, and snippets.

@voidfiles
voidfiles / gist:2859704
Created June 2, 2012 19:38
Instapaper's Bookmarklet as of June 2, 2010
// Bookmarklet portion
javascript: function iprl5() {
var d = document,
z = d.createElement('scr' + 'ipt'),
b = d.body,
l = d.location;
try {
if (!b) throw (0);
@voidfiles
voidfiles / gist:2860165
Created June 2, 2012 22:11
Findings Bookmarklet
javascript: e = document.createElement('script');
e.setAttribute('type', 'text/javascript');
e.setAttribute('src', '//findings.com/bookmarklet/loader');
document.body.appendChild(e);
void(0);
(function(window, undefined) {
var date = new Date();
window.FDGS = window.FDGS || {
@voidfiles
voidfiles / tumblr_bookmarklet
Created June 2, 2012 22:28
Tumblr's Bookmarklet
javascript: var d = document,
w = window,
e = w.getSelection,
k = d.getSelection,
x = d.selection,
s = (e ? e() : (k) ? k() : (x ? x.createRange().text: 0)),
f = 'http://www.tumblr.com/share',
l = d.location,
e = encodeURIComponent,
p = '?v=3&u=' + e(l.href) + '&t=' + e(d.title) + '&s=' + e(s),
@thiagokokada
thiagokokada / lock_screen.py
Last active May 5, 2024 17:07
Lock screen using i3lock with background blur in Python
#!/usr/bin/env python
from subprocess import check_call, CalledProcessError
from tempfile import NamedTemporaryFile
from dpms import DPMS
from mss import mss
from PIL import Image, ImageFilter
GAUSSIAN_BLUR_RADIUS = 5
@llybin
llybin / asus_kbd_backlight.txt
Last active May 5, 2024 17:07
Asus TUF keyboard backlight
# Brightness
0 - Off
1 - Low
2 - Medium
3 - High
echo 1 > /sys/class/leds/asus::kbd_backlight/brightness
# State, when backlight is enabled
@voidfiles
voidfiles / clipboards_bookmarklet.js
Created June 2, 2012 22:39
Clipboard.com's Bookmarklet
// Bookmarklet
javascript: (function(a) {
var b = a.document;
try {
a.CLIPBOARD.client.Clipper.instances["_d09a13b8af38e2f71b4f1626c07e1c42"].activate();
return
} catch(e) {}
var c = b.createElement("script"),
d = b.getElementsByTagName("head")[0],
a = a.location.protocol;
@voidfiles
voidfiles / subscriber.html
Created June 16, 2012 19:59
Simple Javascript Event Delegation
<html>
<head>
<title>Subscriber Test Page</title>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.0r4/build/reset-fonts-grids/reset-fonts-grids.css">
<style type="text/css" media="screen">
body {
font-family: Myriad Pro, Helvetica, Arial;
font-size:138.5%;
}
h1 {
@voidfiles
voidfiles / main.js
Created June 21, 2013 21:20
AOL Reader Beautified Javascript
/**
* Isotope v1.5.25
* An exquisite jQuery plugin for magical layouts
* http://isotope.metafizzy.co
*
* Commercial use requires one-time purchase of a commercial license
* http://isotope.metafizzy.co/docs/license.html
*
* Non-commercial use is licensed under the MIT License
*
@prologic
prologic / LearnGoIn5mins.md
Last active May 5, 2024 17:05
Learn Go in ~5mins
@Emmanuerl
Emmanuerl / awk.MD
Created May 5, 2024 16:05
Backend study group AWK hands on session

The AWK CLI Tool

A step by step introduction into the AWK command, it's syntax, uses and sample use cases.

Introduction

The awk command is a column based manipulation tool that can be used for a variety of things, from reading CSVs to killing processes, literally. At the very core, AWK is based on the following awk '{expression to qualify output} {print $output expression}' Although it's a cli tool, it offers a lot of programming language paradigms such as