Skip to content

Instantly share code, notes, and snippets.

View Kwpolska's full-sized avatar

Chris Warrick Kwpolska

View GitHub Profile
MIN_STARS = 1
MAX_STARS = 12
for stars in range(MIN_STARS, MAX_STARS + 1):
spaces = MAX_STARS - stars
print(' ' * spaces + '*' * stars)
Setting up Steam content in /home/kwpolska/.local/share/Steam
Running Steam on arch rolling 64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(0)
Installing breakpad exception handler for appid(steam)/version(1.0)
ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".
[2015-09-06 10:04:56] Startup - updater built May 5 2015 12:15:27
SteamUpdateUI: An X Error occurred
X Error of failed request: BadName (named color or font does not exist)
Major opcode of failed request: 45 (X_OpenFont)
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'untitled.ui'
#
# Created by: PyQt5 UI code generator 5.5
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
debug: pacman v4.2.1 - libalpm v9.0.1
debug: parseconfig: options pass
debug: config: attempting to read file /etc/pacman.conf
debug: config: finish section '(null)'
debug: config: new section 'options'
debug: config: HoldPkg: pacman
debug: config: HoldPkg: glibc
debug: config: arch: x86_64
debug: config: usesyslog
debug: config: verbosepkglists
:: Synchronising package databases...
testing is up to date
core is up to date
extra is up to date
community-testing is up to date
community is up to date
multilib-testing is up to date
multilib is up to date
:: Starting full system upgrade...
resolving dependencies...
@Kwpolska
Kwpolska / -
Created August 20, 2015 13:52
[kwpolska@kw-cassandra ~]% sudo pacman -Syu ~ 1
:: Synchronising package databases...
testing is up to date
core is up to date
extra is up to date
community-testing is up to date
community is up to date
multilib-testing is up to date
multilib is up to date
:: Starting full system upgrade...
@Kwpolska
Kwpolska / fork.py
Created August 7, 2015 16:00
os.fork demo
import os
import time
print("forking...")
pid = os.fork()
print("done!")
if pid == 0:
print("hello, I am the child")
else:
print("hello, I am the parent")
#!/usr/bin/env python
import subprocess
import os
out = subprocess.check_output(['sudo', 'repquota', '-t', '/'])
homes = os.listdir('/home/')
for user in homes:
for line in out.splitlines():
if user in line:
print(line)
@Kwpolska
Kwpolska / date-range-parser.py
Last active July 13, 2016 18:19
Date range parser in Python. Moved to Kwpolska/datecond.
# CODE MOVED TO: https://github.com/Kwpolska/datecond
This file has been truncated, but you can view the full file.
--- galtest1 2015-07-11 13:53:20.843397012 +0200
+++ galtest2 2015-07-11 13:53:44.009723115 +0200
@@ -233,104 +233,100 @@
2315,
'99cab11de316dba3ac8bd1dbb921d1a7'],
'checker:': 'MD5Checker',
- 'deps:': [ '/home/kwpolska/git/nikola/nikola/data/themes/base-jinja/templates/comments_helper_intensedebate.tmpl',
- '/home/kwpolska/git/nikola/nikola/data/themes/base-jinja/templates/comments_helper_facebook.tmpl',
- 'cache/posts/2015/05/30/think.pl.html',
- 'cache/posts/2012/06/03/a-review-of-windows-8-release-preview.html',