This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
# In this prototype/example a QTreeView is created. Then it's populated with | |
# three containers and all containers are populated with three rows, each | |
# containing three columns. | |
# Then the last container is expanded and the last row is selected. | |
# The container items are spanned through the all columns. | |
# Note: this requires > python-3.2 | |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
import sys, os, pprint, time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.. | |
<variant> | |
<configItem> | |
<name>dvorak-sk-custom</name> | |
<description>English (SK Custom Dvorak)</description> | |
</configItem> | |
</variant> | |
.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Transparent, irregular edge splash screen with pyGTK and XShape. | |
Takes a png image with transparent section, creates a window with pyGTK, puts this image in | |
there with cairo and then trims the edges with X11 XShape clipping extension. | |
This file demonstrates a python script which loads a png image of size 800x650 and name base.png | |
Then it creates a GTK+/Cairo window with opaque settings from the png file and the transparent | |
portions cut out with a mask. Basic, but works and looks great. | |
Note: this is a proof of concept file. It works, but it is by no means production ready. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Seth Kriticos' vimrc file | |
" Last update: 2010-03-19 | |
" Note - This configuration is for cterm mode (color terminal) | |
" Never got around liking the GUI version | |
" (problematic command line integration) | |
" For GUI use, the highlight commands should be adjusted | |
" Editor behaviour | |
set nocompatible | |
set autoread |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
""" Linux / *NIX daemon base code. | |
This script daemonizes its self with the start option and kills an already | |
running daemon with the stop option. It's kept minimal and simple, but it works | |
and can be extended/re-factored as base-code for a useful daemon. | |
Note: point of daemons is that they are quite and run in the background, add | |
some logging if you are developing a daemon, saves a lot of headaches. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
go test -coverprofile=coverage.out; go tool cover -func=coverage.out; go tool cover -html=coverage.out; rm coverage.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
for f in *.go | |
do | |
echo "processing $f" | |
go fix "$f" | |
gofmt -w "$f" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// go control flow in a linked list based on element type using type assertion | |
package main | |
import ( | |
"fmt" | |
"reflect" | |
"container/list" | |
) | |
type Foo struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
import sys | |
from PySide.QtCore import * | |
from PySide.QtGui import * | |
""" | |
Create a table model from a two dimensional array, | |
first element being the header. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# play files in random order | |
find . -type f \( -name "*.mkv" -o -name "*.avi" -o -name "*.flv" \) -print0 | xargs -0 mplayer -shuffle -fs |
NewerOlder