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 python2 | |
""" | |
This is one of the cooler python scripts that uses simple animation in Tkinter. | |
A bunch of white circles start positioned at the top of the Tkinter panel when it opens. | |
Then, on a light grey background, the snowflakes gently fall downwards. When they reach | |
the bottom, they apparently disappear and start back above the top of the screen and | |
fall back into view. This continuous and soothing snow fall was so relaxing that I made | |
it open in the background of my mac terminal, which had a transparent background. |
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 python2 | |
""" | |
This is an interesting script, to say the least, using simple animation in Tkinter. | |
A few of green circles start positioned at the top-left of the Tkinter panel when it | |
opens. Then, on a white background, the flies disperse and move in all directions in a | |
randomized way. If they hit the edge of the screen, they jump backwards as if it | |
shocked them. The random, even chaotic, movement of the circles makes them appear to be | |
a lot of flies buzzing around the screen. |
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 python2 | |
""" | |
This is a very bubbly yet simple animation in python's Tkinter. | |
A lot of turquoise circles start positioned at the bottom of the Tkinter panel when | |
it opens. Then, on a blue background, The bubbles float fall upwards. Depending on their | |
size, the rise at different speeds: the bigger the faster. When they reach the top, they | |
apparently disappear and start back below the bottom of the screen and float back into | |
view. It's really fun to watch it for a minute or so. |
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 python | |
""" | |
View all of the cursors for your operating system and their names in a nice Tkinter-based Python script. | |
""" | |
__author__ = "dylnmc" | |
from Tkinter import * | |
# All of the cursors I could find - ordered very nicely for you :) |
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
/* | |
This game is for Unix only. | |
It is a simple yet easily navigable Tic-Tac-Toe game for the Unix terminal. To run this file, go | |
to your awesome Unix terminal (after you have downloaded this text file, of course) and | |
navigate to this file. Then, compile and link the program with your handy compiler (which will | |
almost definitely be installed unless you have removed it) using the command 'gcc TicTacToe.c'. | |
This creates an executeable. To run it, you can simply type './a.out'. If you want to have a more | |
memorable file and/or prevent conflicts, simply change the name with the 'mv' tool | |
('mv a.out TicTacToe') or use the '-o' ("output file") when compiling |
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 python | |
__author__ = "dylnmc" | |
def main(): | |
from decimal import Decimal, getcontext | |
from os import nice | |
getcontext().prec = 100 | |
two = Decimal("2.0") |
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 | |
if __name__ == '__main__': | |
from sys import platform | |
if not platform.startswith('linux'): | |
from sys import stderr | |
print('Sorry; this only works in Linux!', file=stderr) | |
exit(1) | |
from os import system | |
from random import randint |
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/sh | |
# view here: | |
# https://i.stack.imgur.com/OK3po.png | |
e=$'\e[' | |
for n in {0..7}; do | |
printf "${e}"'38;05;'"${n}"'m%-6s' '('"$n"') ' | |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
def main(rgb): | |
if len(rgb) != 3 and len(rgb) != 4: | |
from sys import stderr, exit | |
stderr.write('expected either "r g b" or (r,g,b) as input\n') | |
exit(2) | |
print("#"+("{:02x}"*3).format(*rgb[:3])) |
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
" v!autocmd (: | |
augroup Vimrc " (: | |
autocmd! | |
" vim shenanigans | |
autocmd WinEnter,BufWinEnter $HOME/simplevimrc.vim call <sid>setupVimFile() | |
autocmd BufWinLeave $HOME/simplevimrc.vim call <sid>cleanupVimFile() | |
autocmd BufRead,TextChanged,FileChangedShellPost,FileReadPost,FilterReadPost,ShellFilterPost $HOME/simplevimrc.vim call <sid>computeFirstFolds() |
OlderNewer