A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Clock</title> | |
| <style> | |
| body { | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; |
| import subprocess | |
| import matplotlib.pyplot as plt | |
| import threading | |
| # Use a nicer style for the plot | |
| plt.style.use('seaborn-darkgrid') | |
| def get_wifi_data(): |
| const fullAlphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; | |
| const restrictedAlphabet = 'BCDFGHJKLMNPQRSTVWXZbcdfghjklmnpqrstvwxz'; | |
| const threadPrefix = 'thread-'; | |
| const messagePrefix = 'msg-'; | |
| const isWhitespace = str => /^[\s\xa0]*$/.test(str); | |
| const isInvalidString = str => str ? (str.indexOf(threadPrefix) !== -1 || str.indexOf(messagePrefix) !== -1) : false; | |
| const encode = function(str) { | |
| if (isWhitespace(str)) return str; |
| $(window).ready(function() { | |
| $(document).arrive('.hover-row', function() { | |
| $('.data-table > tbody > tr').hover(function() { | |
| var rowNum = $(this).children('.row-num').text(); | |
| $(this).closest('.table-div').children('.hover-row').val(rowNum); | |
| }); | |
| }); | |
| }); |
| #!/usr/bin/env bash | |
| cd /tmp | |
| # libevent | |
| wget https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz | |
| tar xvf libevent-2.1.8-stable.tar.gz | |
| cd libevent-2.1.8-stable | |
| ./configure --prefix=$HOME | |
| make -j 8 |
| ; how to write scripts: http://www.autohotkey.com/docs/ | |
| #IfWinActive ahk_class CabinetWClass ; File Explorer | |
| ^Backspace:: | |
| #IfWinActive ahk_class Progman ; Desktop | |
| ^Backspace:: | |
| #IfWinActive ahk_class Notepad | |
| ^Backspace:: | |
| Send ^+{Left}{Backspace} | |
| #IfWinActive |
| " ==VimperatorColorSchema== | |
| " name: Solarlized enhanced by Kenta Suzuki. (Based on 'Solarized') | |
| " url: https://github.com/suzuken/dotfiles/blob/master/vimperator/colors/solarized.vimp | |
| " ==/VimperatorColorSchema== | |
| " | |
| " Solarized - Ethan Schoonover | |
| " http://ethanschoonover.com/solarized | |
| " | |
| " SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB | |
| " --------- ------- ---- ------- ----------- ---------- ----------- ----------- |
| import smtplib | |
| from email.MIMEMultipart import MIMEMultipart | |
| from email.MIMEText import MIMEText | |
| def sendmail(message, subject='subject', username='username', password='password', address='reciever'): | |
| msg = MIMEMultipart() | |
| msg['From'] = username | |
| msg['To'] = address | |
| msg['Subject'] = subject | |
| msg.attach(MIMEText(message, 'plain')) |