Probably one of the easiest things you'll ever do with gpg
Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH
First get the public key
keybase pgp export | gpg --import
Next get the private key
// Intended to be run on https://google.pl | |
function executeSearchTypingScript() { | |
const googleDomain = 'google.pl'; | |
if (window.location.href.indexOf('google.pl') === -1) { | |
throw new Error(`This script should be run on ${googleDomain}`); | |
} | |
const searchInputField = document.querySelector('[aria-label=Szukaj]'); |
### Keybase proof | |
I hereby claim: | |
* I am antoni on github. | |
* I am antoni (https://keybase.io/antoni) on keybase. | |
* I have a public key ASAPlJzPyid_8vQoMmG2Dj5nzdugiKAYEtNIAJFGIA0AFgo | |
To claim this, I am signing this object: |
Probably one of the easiest things you'll ever do with gpg
Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH
First get the public key
keybase pgp export | gpg --import
Next get the private key
#!/bin/bash | |
# Might as well ask for password up-front, right? | |
sudo -v | |
# Keep-alive: update existing sudo time stamp if set, otherwise do nothing. | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
# Example: do stuff over the next 30+ mins that requires sudo here or there. | |
function wait() { |
#!/usr/bin/env bash | |
: ' Usage: | |
bash <(wget --quiet --output-document=- https://gist.githubusercontent.com/antoni/0baa816895d7155c7f41e155e2ee7f70/raw) | |
' | |
# Replaces $1 with $2 in the origin named 'origin' of Git repo | |
# Should be executed from inside of the repository folder | |
function replace_in_origin() { |
### Keybase proof | |
I hereby claim: | |
* I am antoni on github. | |
* I am antoni (https://keybase.io/antoni) on keybase. | |
* I have a public key ASBjyuQy5Z1RKEScj1d1U_KBa_wNzjunfSWleyf_ITIoLAo | |
To claim this, I am signing this object: |
tmux new [-s name] [cmd]
(:new
) - new sessiontmux ls
(:ls
) - list sessionstmux switch [-t name]
(:switch
) - switches to an existing session// Dumps an object in JSON. Works with circular structures like: | |
// | |
// var o = {}; | |
// o.o = o; | |
JSON.stringifyOnce = function(obj, replacer, indent){ | |
var printedObjects = []; | |
var printedObjectKeys = []; | |
function printOnceReplacer(key, value){ | |
if ( printedObjects.length > 2000){ // browsers will not print more than 20K, I don't see the point to allow 2K.. algorithm will not be fast anyway if we have too many objects |
// C++ includes used for precompiling -*- C++ -*- | |
// Copyright (C) 2003-2013 Free Software Foundation, Inc. | |
// | |
// This file is part of the GNU ISO C++ Library. This library is free | |
// software; you can redistribute it and/or modify it under the | |
// terms of the GNU General Public License as published by the | |
// Free Software Foundation; either version 3, or (at your option) | |
// any later version. |
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"strconv" | |
) | |
func main() { |