Skip to content

Instantly share code, notes, and snippets.

View DmitryMyadzelets's full-sized avatar

Dmitry Myadzelets DmitryMyadzelets

View GitHub Profile
<link href='http://fonts.googleapis.com/css?family=Open+Sans:700' rel='stylesheet' type='text/css'>
<a id="view-code" href="http://codepen.io/virgilpana/pen/wBOBYo" target="_blank">VIEW CODE</a>
<div id="window">
<div id="header">
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
</div>
@DmitryMyadzelets
DmitryMyadzelets / raspi-monitor
Created June 28, 2017 12:18 — forked from simlun/raspi-monitor
Script to enable and disable the HDMI signal of the Raspberry PI
#!/bin/bash -e
# /usr/local/sbin/raspi-monitor
# Script to enable and disable the HDMI signal of the Raspberry PI
# Inspiration: http://www.raspberrypi.org/forums/viewtopic.php?t=16472&p=176258
CMD="$1"
function on {
/opt/vc/bin/tvservice --preferred
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Olivier Scherrer
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
#!/usr/bin/python -O
from collections import defaultdict
from random import random, choice
from string import ascii_lowercase
from subprocess import Popen, PIPE
from time import time, sleep
# get a list of words with only ASCII characters
words = [w.strip().lower() for w in open("/usr/share/dict/words").readlines()]
words = [w for w in words if all([c in ascii_lowercase for c in w])]