Skip to content

Instantly share code, notes, and snippets.

# Install F-Droid, Termux, Termux:API and Termux:Boot. Then open a Termux session and:
# pkg install curl && curl https://gist.github.com/gist_id | bash
PUBLIC_SSH_KEY_URL="https://gabi.is/id_rsa.chewie@gmail.com.pub"
pkg install openssh termux-api dnsutils
mkdir -p ~/.termux/boot/ ~/.ssh
[ -f ~/.termux/boot/daemons.sh ] || cat >~/.termux/boot/daemons.sh <<EOL
#!/data/data/com.termux/files/usr/bin/bash
termux-wake-lock

Assignments when inline if is false

[1] pry(main)> piticli = "wadus" if false
=> nil
[2] pry(main)> defined? piticli
=> "local-variable"
[3] pry(main)> h = {}; h[:piticli] = "wadus" if false
=> nil
[4] pry(main)> h.key? :piticli
@vibragiel
vibragiel / byzanz-gui
Created September 9, 2015 13:26
Script to grab a screenshot, put it in a Dropbox directory and copy its public link into the clipboard. Modified from: http://askubuntu.com/a/201018
#!/bin/bash
# AUTHOR: (c) Rob W 2012, modified by MHC (http://askubuntu.com/users/81372/mhc), modified by Gabi (http://gabi.is) to use xrectsel and Dropbox
# NAME: GIFRecord 0.1
# DESCRIPTION: A script to record GIF screencasts.
# LICENSE: GNU GPL v3 (http://www.gnu.org/licenses/gpl.html)
# DEPENDENCIES: byzanz,gdialog,notify-send (install via sudo add-apt-repository ppa:fossfreedom/byzanz; sudo apt-get update && sudo apt-get install byzanz gdialog notify-osd beep)
# Time and date
TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
@vibragiel
vibragiel / screenshare
Last active September 9, 2015 11:13
Script to grab a screenshot, put it in a Dropbox directory and copy its public link into the clipboard. Modified from https://gist.github.com/Saicheg/4231551
#!/bin/bash
# Usage: screenshare [-m <window|area|desktop>] [-d <integer>] [-p]
# -m window Grab active window
# -m area Grab an area selected with the mouse
# -m desktop Grab whole desktop
# -d <integer> Grab after the specified delay in seconds
# -p Include mouse pointer in the screenshot
# Description: Take a screenshot, store it in Dropbox and copy public link
# into the clipboard
# Author: Gabriel Rodríguez Alberich
@vibragiel
vibragiel / emoji_bookmarklet.md
Last active March 10, 2017 15:56
Bookmarklet to show quick unicode emojis for quick copy&pasting.

#Emoji bookmarklet

This bookmarklet shows the unicode Emojis in your native font for quick copy&pasting. Depending on your system, some (or all) of them may not render properly.

Create a bookmark in your bookmarks toolbar and paste the following code into the URL/Location field:

javascript: (function () {
alert("😁 😂 😃 😄 😅  🕦 🕧 😊 😋 😌 😍 😏 😒 😓 😔 😖 😘 😚 😜 😝 😞 😠 😡 😢 😣 😤 😥 😨 😩 😪 😫 😭 😰 😱 😲 😳 😵 😷 😸 😹 😺 😻 😼 😽 😾 😿 🙀 🙅 🙆 🙇 🙈 🙉 🙊 🙋 🙌 🙍 🙎 🙏 ✂ ✅ ✈ ✉ ✊ ✋ ✌ ✏ ✒ ✔ ✖ ✨ ✳ ✴ ❄ ❇ ❌ ❎ ❓ ❔ ❕ ❗ ❤ ➕ ➖ ➗ ➡ ➰ 🚀 🚃 🚄 🚅 🚇 🚉 🚌 🚏 🚑 🚒 🚓 🚕 🚗 🚙 🚚 🚢 🚤 🚥 🚧 🚨 🚩 🚪 🚫 🚬 🚭 🚲 🚶 🚹 🚺 🚻 🚼 🚽 🚾 🛀 Ⓜ 🅰 🅱 🅾 🅿 🆎 🆑 🆒 🆓 🆔 🆕 🆖 🆗 🆘 🆙 🆚 🇩🇪 🇬🇧 🇨🇳 🇯🇵 🇰🇷 🇫🇷 🇪🇸 🇮🇹 🇺🇸 🇷🇺 🈁 🈂 🈚 🈯 🈲 🈳 🈴 🈵 🈶 🈷 🈸 🈹 🈺 🉐 🉑 © ® ‼ ⁉ 8⃣ 9⃣ 7⃣ 6⃣ 1⃣ 0⃣ 2⃣ 3⃣ 5⃣ 4⃣ #⃣ ™ ℹ ↔ ↕ ↖ ↗ ↘ ↙ ↩ ↪ ⌚ ⌛ ⏩ ⏪ ⏫ ⏬ ⏰ ⏳ ▪ ▫ ▶ ◀ ◻ ◼ ◽ ◾ ☀ ☁ ☎ ☑ ☔ ☕ ☝ ☺ ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓ ♠ ♣ ♥ ♦ ♨ ♻ ♿ ⚓ ⚠ ⚡ ⚪ ⚫ ⚽ ⚾ ⛄ ⛅ ⛎ ⛔ ⛪ ⛲ ⛳ ⛵ ⛺ ⛽ ⤴ ⤵ ⬅ ⬆ ⬇ ⬛ ⬜ ⭐ ⭕ 〰 〽 ㊗ ㊙ 🀄 🃏 🌀 🌁 🌂 🌃 🌄 🌅 🌆 🌇 🌈 🌉 🌊 🌋 🌌 🌏 🌑 🌓 🌔 🌕 🌙 🌛 🌟 🌠 🌰 🌱 🌴 🌵 🌷 🌸 🌹 🌺 🌻 🌼 🌽 🌾 🌿 🍀 🍁 🍂 🍃 🍄 🍅 🍆 🍇 🍈 🍉 🍊 🍌 🍍 🍎 🍏 🍑 🍒 🍓 🍔 🍕 🍖 🍗 🍘 🍙 🍚 🍛 🍜 🍝 🍞 🍟 🍠 🍡 🍢 🍣 🍤 🍥 🍦 🍧 🍨 🍩 
@vibragiel
vibragiel / emoticons_bookmarklet_standalone.md
Created April 10, 2014 11:28
Bookmarklet to show handy copyable emoticons. Standalone version.

#Look Of Disapproval bookmarklet

This bookmarklet shows the look of disapproval emoticon, plus a bunch of other handy ones. It's based on maciak's bookmarklet, but uses an alert() instead.

Create a bookmark in your bookmarks toolbar and paste the following code into the URL/Location field:

javascript: (function () {
alert("ಠ_ಠ\nಠ_ರೃ\nಥ_ಥ\nಥ◡ಥ\nಠ╭╮ಠ\n⊙▃⊙\n(╯°□°)╯︵ ┻━┻\n¯\_(ツ)_/¯\n(╥﹏╥)\n◉‿◉");
}());
@vibragiel
vibragiel / emoticons_bookmarklet.md
Last active August 29, 2015 13:58
Bookmarklet to show handy copyable emoticons. External maintained version.

#Look Of Disapproval bookmarklet

This bookmarklet shows the look of disapproval emoticon, plus a bunch of other handy ones. It's based on maciak's bookmarklet, but uses an alert() instead.

Create a bookmark in your bookmarks toolbar and paste the following code into the URL/Location field:

javascript: (function () {
  var jsCode = document.createElement('script');
  jsCode.setAttribute('src', 'https://gist.githubusercontent.com/vibragiel/10368913/raw/ae08f049ae42bfd7394eb87dbcf8b4e0dff38f67/showEmoticos.js');
 document.body.appendChild(jsCode);

Keybase proof

I hereby claim:

  • I am vibragiel on github.
  • I am gabi (https://keybase.io/gabi) on keybase.
  • I have a public key whose fingerprint is E358 7EB7 117D 9455 F198 1F2F 35C3 BEEA 4D1D 5421

To claim this, I am signing this object:

@vibragiel
vibragiel / notify.py
Last active November 3, 2020 10:56
Desktop file for WeeChat. Place it in ~/.local/share/applications. The --class parameter and StartupWMClass key allow WeeChat to have a proper icon separated from gnome-terminal (e.g. in the Unity launcher). Also included the notify.py plugin to make the icon vibrate when mentioned.
# Author: lavaramano <lavaramano AT gmail DOT com>
# Improved by: BaSh - <bash.lnx AT gmail DOT com>
# Ported to Weechat 0.3.0 by: Sharn - <sharntehnub AT gmail DOT com)
# This Plugin Calls the libnotify bindings via python when somebody says your nickname, sends you a query, etc.
# To make it work, you may need to download: python-notify (and libnotify - libgtk)
# Requires Weechat 0.3.0
# Released under GNU GPL v2
#
# 2010-02-20, Aron Griffis <agriffis@n01se.net>
# version 0.0.5: Add nick_separator, don't call show_notification twice on
@vibragiel
vibragiel / 350_exim4-config_vdom_aliases
Created July 3, 2013 18:14
Fichero router para exim4, a colocar en /etc/exim4/conf.d/router, para permitir dominios y usuarios de correo virtuales. Dentro de /etc/mail/virtual/ hay que crear un fichero por cada dominoi, y dentro los alias de correo que se mapean a usuarios locales.
router_virtualdomains:
driver = redirect
domains = dsearch;/etc/mail/virtual
data=${lookup{$local_part}lsearch*{/etc/mail/virtual/$domain}}
no_more