Skip to content

Instantly share code, notes, and snippets.

@endolith
endolith / Has weird right-to-left characters.txt
Last active July 17, 2024 12:41
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@kralin
kralin / gist:4766772e168fee7796ad
Created June 25, 2014 14:50
emacs-snapshots on debian
wget -q http://londo.ganneff.de/apt.key -O- | apt-key add -
echo "deb http://londo.ganneff.de wheezy main" > /etc/apt/sources.list.d/emacs.list
aptitude update
aptitude install emacs-snapshot emacs-snapshot-gtk
@zmwangx
zmwangx / Postfix: sender-dependent SASL authentication.md
Last active May 10, 2024 14:18
Postfix: sender-dependent SASL authentication — relay to multiple SMTP hosts, or relay to the same host but authenticate as different users (e.g., two Gmail accounts)

This is a sequel to "Postfix: relay to authenticated SMTP".

I would like to send mail from two different Gmail accounts using Postfix. Here is the relevant section in the Postfix documentation: Configuring Sender-Dependent SASL authentication.

As a concrete example, here's how to set up two Gmail accounts (only relevant sections of the config files are listed below):

/etc/postfix/main.cf:
    # sender-dependent sasl authentication
    smtp_sender_dependent_authentication = yes

sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay

@gene1wood
gene1wood / batch-delete-gmail-emails.js
Last active July 19, 2024 19:59
A Google Apps Script script to bulk delete large amounts of email in Gmail while avoiding the error #793 which Gmail encounters normally
/*
This script, when used with Google Apps Scripts, will delete 400 emails and
can be triggered to run every few minutes without user interaction enabling you
to bulk delete email in Gmail without getting the #793 error from Gmail.
Google returns a maximum of 500 email threads in a single API call.
This script fetches 400 threads in case 500 threads is causing timeouts
Configure the search query in the code below to match the type of emails
you want to delete
div > .vimiumHintMarker {
/* linkhint boxes */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#565756),
color-stop(100%,#242524));
border: 1px solid #e4e5e4;
opacity: 1.0;
text-shadow: none !important;
}
div > .vimiumHintMarker span {
@xero
xero / battest.sh
Created June 11, 2015 15:20
low battery alert cron job
BATPATH=/sys/class/power_supply/BAT0
BAT_FULL=$BATPATH/charge_full
BAT_NOW=$BATPATH/charge_now
bf=$(cat $BAT_FULL)
bn=$(cat $BAT_NOW)
if [ $(( 100 * $bn / $bf )) -lt 15 ]
then
notify-send "low battery!"
fi
@lazyfrost
lazyfrost / mutt-gmail-yandex.md
Last active November 16, 2023 19:25
Configuring mutt to work with gmail and yandex
<!doctype html>
<title>dynamic</title>
<button onclick="addGeneratedForms()">addGeneratedForms</button>
<script>
function addGeneratedForms(){
var div = document.createElement('div');
div.innerHTML = '<form class="login" method="post" action="login">\
<input type="text" name="username">\
<input type="password" name="password">\
<button type="submit">login</button> stay on this page but update the url with pushState\
@clisamurai
clisamurai / Nucleus.md
Last active May 30, 2024 23:27
A simple text editor in a bookmarklet

Nucleus

Nucleus is a plain-text editor hidden in a bookmarklet. It is fully responsive and supports all HTML5-supporting browsers. Nucleus is ultra-lightweight - it doesn't support any formating at all and saves itself along with your files when you save it. You can save Nucleus documents in PDF format by utilising the print-to-PDF functionality of your browser. It is also fully customizable and open-source - simply change the source code.

Requirements

  • An HTML5 compliant web browser

Installation

@zoka123
zoka123 / test.sh
Created August 4, 2016 13:09
Bash test if directory is writable
# By path
if [ -w "/path/to/dir" ]; then echo "WRITABLE"; else echo "NOT WRITABLE"; fi
# Current dir
if [ -w `pwd` ]; then echo "WRITABLE"; else echo "NOT WRITABLE"; fi