This file contains hidden or 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
$ cpkg | |
cpkg <command> <...> | |
Commands: | |
list [pkg] List packages or versions of [pkg] | |
use [global|(session)] <pkg>-<ver> Use <pkg>-<ver> | |
drop [global|(session)] <pkg>-<ver> Stop using <pkg>-<ver> | |
In progress: |
This file contains hidden or 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
slndir() { | |
if [ -z "${1}" ] || [ -z "${2}" ]; then | |
echo 'Usage: slndir /dir1 /dir2/' | |
else | |
SRC=${1} | |
if [ "${2}" = "." ] || [ "${2}" = "./" ]; then | |
DST=${PWD} | |
else | |
DST=${2} | |
fi |
This file contains hidden or 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 ruby | |
require 'drb' | |
class PingCheck | |
attr_accessor :cfg | |
def initialize(count=3, wait=3) | |
@cfg = Hash.new | |
@cfg[:count] = count | |
@cfg[:wait] = wait |
This file contains hidden or 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 | |
################################################################################ | |
# # | |
# Copyright (c) 2013, Mike 'Fuzzy' Partin <[email protected]> # | |
# All rights reserved. # | |
# # | |
# Redistribution and use in source and binary forms, with or without # | |
# modification, are permitted provided that the following conditions are met: # | |
# # |
This file contains hidden or 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
$ ls | |
./ ../ Python-2.7.4.tar.bz2 car.py* ruby-1.8.6-p420.tar.gz | |
$ ./car.py | |
Sat May 25 19:55:33 2013 | |
objA = Libarchive(fname="/home/mpartin/.cpkg/tmp/ruby-1.8.6-p420.tar.gz", debug=True) | |
DEBUG: Loaded library <CDLL '/usr/lib/libarchive.so', handle 80079d000 at 801775f90> | |
objB = Libarchive(fname="/home/mpartin/.cpkg/tmp/Python-2.7.4.tar.bz2", debug=True) | |
DEBUG: Loaded library <CDLL '/usr/lib/libarchive.so', handle 80079d000 at 80177e0d0> | |
ret = objA.extractArchive() |
This file contains hidden or 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 | |
################################################################################ | |
# # | |
# Copyright (c) 2013, Mike 'Fuzzy' Partin <[email protected]> # | |
# All rights reserved. # | |
# # | |
# Redistribution and use in source and binary forms, with or without # | |
# modification, are permitted provided that the following conditions are met: # | |
# # |
This file contains hidden or 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
class Logging | |
def initialize | |
@PROMPTS = { | |
:info => '>>'.bold.green, | |
:warn => '**'.bold.yellow, | |
:error => '!!'.red, | |
:fatal => '!!'.bold.red, | |
:debug => '**'.bold.cyan | |
} |
This file contains hidden or 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
mike@jubei:~$ git clone git://git.silverirc.com/screenfetch.git | |
Cloning into 'screenfetch'... | |
remote: Counting objects: 1595, done. | |
remote: Compressing objects: 100% (1048/1048), done. | |
remote: Total 1595 (delta 928), reused 948 (delta 533) | |
Receiving objects: 100% (1595/1595), 1.90 MiB | 390 KiB/s, done. | |
Resolving deltas: 100% (928/928), done. | |
mike@jubei:~$ cd screenfetch/ | |
mike@jubei:~/screenfetch$ ./screenfetch-dev | |
_,met$$$$$gg. mike@jubei |
This file contains hidden or 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 ruby | |
require 'open3' | |
require 'open-uri' | |
require 'getoptlong' | |
require 'digest/md5' | |
class Apt | |
def initialize |
This file contains hidden or 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
from cryptolizzard.db.peewee import * | |
db = MySQLDatabase('cryptolizzard', user='clizzard', passwd='<pass>', host='192.168.0.2') | |
db.connect() | |
class BaseModel(Model): | |
class Meta: | |
database = db | |
# Operational models |