Skip to content

Instantly share code, notes, and snippets.

<?php
$today = date('Ymd');
$this_year = date('Y');
if ($today <= $this_year . "0901") {
echo $this_year;
}
else {
echo $this_year + 1;
}
?>
<noscript>
<!-- thedaywefightback banner -->
<a href="https://thedaywefightback.org">
<div style="background:black;height:100px;width:100%;bottom:0;position:fixed;text-align:center;">
<img height="110px" width="auto" src="./images/thedaywefightback.png" alt="" width="664" height="272">
</div>
</a>
<!-- /thedaywefightback -->
</noscript>

Keybase proof

I hereby claim:

  • I am myano on github.
  • I am yano (https://keybase.io/yano) on keybase.
  • I have a public key whose fingerprint is 3C99 3EE0 5B52 C25F A0A3 C0FC 1A29 1C36 DD4C 89A9

To claim this, I am signing this object:

#!/usr/bin/env python
import sys
from PyQt4 import QtCore, QtGui, QtWebKit
from ui_mainwindow import Ui_MainWindow
class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
# Maintain the list of browser windows so that they do not get garbage
# collected.
_window_list = []
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
My twitter handle is [@kd8rhr](https://twitter.com/kd8rhr)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCgAGBQJTj5D5AAoJEKBpQL3CDq4d0W0P/jzH8cRszxpQiKQwMRtm3lfH
o3EZg58xyiApKE0XMPzLhwnU7iXo9FNeGIwnxJODRT+sfiUd3eF6tqPRzhwLQr+W

Keybase proof

I hereby claim:

  • I am myano on github.
  • I am yano (https://keybase.io/yano) on keybase.
  • I have a public key whose fingerprint is 4515 CA81 98B9 AED8 F7BB DAC7 A069 40BD C20E AE1D

To claim this, I am signing this object:

#!/usr/bin/env python
import os
def file_size_from_list(incoming_list):
## returns total size in bytes of all files in the incoming list
total = 0
do you want to build a program?
it doesn't have to be a program
come on lets go and code
i never see you write code
it's like you hate code now
we use to pair program lots!
and now we're not
i wish you would write some code
#!/usr/bin/env python
'''
Copyright 2015 Michael Yanovich, yanovich.net
Licensed under the Eiffel Forum License 2.
'''
from sets import Set
def prepare_list(inc):
#!/usr/bin/env python
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'