Skip to content

Instantly share code, notes, and snippets.

@vlevit
vlevit / free_email_provider_domains.txt
Last active May 18, 2018 — forked from tbrianjones/free_email_provider_domains.txt
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
View free_email_provider_domains.txt
1033edge.com
11mail.com
123box.net
123.com
123india.com
123mail.cl
123qwe.co.uk
126.com
150mail.com
150ml.com
View meanangle.py
#!/usr/bin/python2
import sys
def mean_angle(angles):
edges = [a - angles[i] for i, a in enumerate(angles[1:])] + [360 - angles[-1] + angles[0]]
maxedge = max(edges)
start = (edges.index(maxedge) + 1) % len(edges)
angles2 = angles[:start] + [a - 360 for a in angles[start:]]
mean = float(sum(angles2)) / len(angles)
if mean < 0:
@vlevit
vlevit / mytypo
Last active Aug 29, 2015
my typograpic keyboard layout
View mytypo
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┲━━━━━━━━━┓
│ ~ ≈ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ ­­ │ + ± ┃ ⌫ ┃
│ ` ʼ │ 1 ¹ │ 2 ² │ 3 ³ │ 4 $ │ 5 │ 6 │ 7 & │ 8 • │ 9 │ 0 │ - — │ = ≠ ┃Backspace┃
┢━━━━━┷━┱───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┺━┳━━━━━━━┫
┃ ┃ Q │ W │ E │ R │ T ‡ │ Y │ U │ I │ O │ P ˝ │ { { │ } } ┃ | ┃
┃ Tab ↹ ┃ q │ w │ e € │ r ® │ t † │ y ¥ │ u µ │ i │ o ° │ p ´ │ [ [ │ ] ] ┃ \ ┃
┣━━━━━━━┻┱────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┺━━━━━━━┫
┃RUS UKR ┃ A │ S § │ D │ F │ G │ H │ J ‚ │ K ‘ │ L ’ │ : │ " ┃ ┃
┃ ENG ┃ a ́ │ s $ │ d ÷ │ f £ │ g │ h ₴ │ j „ │ k “ │ l ” │ ; ‘ │ ' ’ ┃ Enter ⏎ ┃
┣━━━━━━━━┻━┱───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┲━━━┻━━━━━━━━━━━━┫
@vlevit
vlevit / movements.gv
Created Feb 10, 2013
Направления в изобразительном искусстве (граф)
View movements.gv
digraph "Art Movements" {
ranksep=1.25; rankdir=BT; size=12
// ranksep=1.25; rankdir=LR; nodesep=0.75; size=24 // Left-to-right drawing
node [shape=plaintext,fontsize=20];
longago -> XIV -> XVII -> XVIII -> XIX -> post19_1 -> post19_2 ->
XX -> post20 [style=invis];
@vlevit
vlevit / download-cover
Created Jan 21, 2013
Dirty script to download covers for the album of currently playing song by mpd with glyrc
View download-cover
#!/bin/bash
# Dirty script to download covers for the album of currently playing song by mpd
# with glyrc
# Copyright (c) 2013 Vyacheslav Levit
# Licensed under The MIT License: http://opensource.org/licenses/MIT
MUSIC_DIR="$HOME/Music"
TEMPDIR=/var/tmp
@vlevit
vlevit / mnuc
Last active Mar 27, 2019
Script intended to be executed from ncmpcpp (execute_on_song_change preference) running from urxvt to set album cover as background image
View mnuc
#!/bin/bash
# Script intended to be executed from ncmpcpp (execute_on_song_change
# preference) running from urxvt to set album cover as background image
# Copyright (c) 2013 Vyacheslav Levit
# Licensed under The MIT License: http://opensource.org/licenses/MIT
MUSIC_DIR=$HOME/Music
DARKEN=50 # 0 - original image colors, 100 - absolutely black background
@vlevit
vlevit / close-all-windows
Created Jun 5, 2012
close all windows and optionally wait until some of them close
View close-all-windows
#!/bin/bash
# close all windows and optionally wait until some of them close
# Copyright (C) 2012 Vyacheslav Levit
# License: GPLv3 or later. See <http://www.gnu.org/licenses/>
function usage
{
echo "Usage: ${0##*/} [--wait [window_classes]]"
You can’t perform that action at this time.