Skip to content

Instantly share code, notes, and snippets.

@gojun077
gojun077 / LFCS_study
Created March 19, 2015 05:32
LFCS Study Outline 2015.02.28
* LFCS Domains 2015.02
Note - the domains will change somewhat in March 2015. SW RAID
with mdadm will be removed
** The Command Line
*** Editing text files on the CLI
Covers the use of the basic text editors nano and gedit as well
as the advanced editors _vi_ and _emacs_
- nano
simple CLI-based text editor
@gojun077
gojun077 / brainworkshop_UpdateLabel.pyw
Created February 19, 2015 16:56
pyglet 1.2 breaks brainworkshop.pyw class UpdateLabel
class UpdateLabel:
def __init__(self):
self.label = pyglet.text.Label(
'',
multiline = True, width = (field.size // 3 - 4), halign='middle',
font_size=11, bold=True,
color=(0, 128, 0, 255),
x=window.width//2, y=field.center_x + field.size // 6,
anchor_x='center', anchor_y='center', batch=batch)
self.update()
@gojun077
gojun077 / keybase.md
Created February 16, 2015 13:14
keybase.io github proof for gojun077

Keybase proof

I hereby claim:

  • I am gojun077 on github.
  • I am gojun077 (https://keybase.io/gojun077) on keybase.
  • I have a public key whose fingerprint is 79F1 73A9 3EB3 623D 32F8 6309 A569 30CF 7235 138D

To claim this, I am signing this object:

#!/bin/bash
#===========================================
# pomo2beeminder.sh created 2015.01.25
# https://github.com/gojun077/pomo2beeminder
# Jun Go [email protected]
#===========================================
# This script is designed to be launched by xfce4-timer-plugin
# or pystopwatch after a 25-minute pomodoro timer completes.
# The user will be asked whether or not the pomodoro was completed
# successfully (without distractions). If the answer is 'y', the
@gojun077
gojun077 / rewrite_configfile()
Created December 21, 2014 09:35
function rewrite_configfile() from brainworkshop.pyw in Archlinux package brainworkshop 4.8.4-4 edited to support custom names for 'stats' and 'dat' files
def rewrite_configfile(configfile, overwrite=False):
global STATS_BINARY
if USER.lower() == 'default':
#statsfile = 'stats.txt'
statsfile = '.brainworkshop.stats'
#STATS_BINARY = 'logfile.dat' # or cmd-line-opts use non-default files
STATS_BINARY = 'default-sessions.dat'
else:
statsfile = USER + '-stats.txt'
try:
@gojun077
gojun077 / gist:9f53e9ecf7f078c07f96
Created December 15, 2014 07:37
sample pxe config for RHEL 5.4 on ATCA blades
DEFAULT menu.c32
prompt 0
TIMEOUT 1
ONTIMEOUT RHEL5.4_x86_64
menu title PXE Boot Menu
label RHEL5.4_x86_64
menu label RHEL5.4_x86_64
kernel images/rhel5dot4_64/vmlinuz
append initrd=images/rhel5dot4_64/initrd.img vnc vncconnect=192.168.10.100:5500 ks=http://192.168.10.100:80/ks5_ATCA_7360_SKT.cfg method=http://192.168.10.100:8080 console=ttyS0 console=ttyS0,57600
@gojun077
gojun077 / deleteLanguage.py
Last active August 29, 2015 14:10
Initial version of a text extraction script that separates English from non-English text; repo at https://github.com/gojun077/deleteLanguage
# This Python3 script takes UTF-8 encoded text files as input and writes out
# two files: (1) only English text (2) only non-English text
FILEIN = "/home/archjun/Downloads/EngKor.txt"
FILEOUTeng = "/home/archjun/Downloads/EngOnly.txt"
FILEOUTkor = "/home/archjun/Downloads/KorOnly.txt"
WHITELIST = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c“”’'
ENGLISH = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
import doctest
#!/bin/bash
#This script launches 'motion' webcam capture program, and once motion
#terminates, the script will join individual webcam captures into a
#mpeg4 movie. Each webcam shot is taken after an interval of 6 seconds
#as set by /etc/motion/motion.conf "snapshot_interval n"
DATE=$(date +%F-%H%M)
VIDPATH="/usr/local/apache2/htdocs/cam1"
if [ -f "/usr/bin/motion" ]; then
motion
@gojun077
gojun077 / centos7_64_vnc_ftp.cfg
Created October 6, 2014 17:19
Sample PXE cfg file for network boot with ftp
DEFAULT menu.c32
#Prompt user for selection
prompt 0
menu title PXE Boot Menu
label CentOS7_x86_64
menu label CentOS7_x86_64
kernel images/centos7_64/vmlinuz
append initrd=images/centos7_64/initrd.img vnc repo=ftp://[email protected]
@gojun077
gojun077 / dnsmasq.conf
Created September 19, 2014 03:50
Sample /etc/dnsmasq.conf for centos7_64_vnc.cfg pxe server config file
# Configuration file for dnsmasq.
#
# Format is one option per line, legal options are the same
# as the long options legal on the command line. See
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details.
# Listen on this specific port instead of the standard DNS port
# (53). Setting this to zero completely disables DNS function,
# leaving only DHCP and/or TFTP.
port=0