Written with StackEdit.
Ordered by level of difficulty and probably age or experience of student, beginning with the easiest.
#!/bin/sh | |
# install cabal-install if necessary | |
sudo pacman -S cabal-install | |
# preparing to install xmobar with all extensions | |
sudo pacman -S alex | |
yaourt haskell-language-c-03 | |
sudo cabal install --global c2hs | |
sudo cabal install --global alsa-mixer |
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
# This script walks all images in current directory and all of its subdirectories | |
# (and so on). Two copies of each image are made, one of the size specified | |
# by --large and one of the size specified by --thumb. The copies are saved in | |
# a subdirectory named according to size, adjacent to the original file. | |
# For example, given the following structure: | |
# | |
# my_images/ |
#!/bin/bash | |
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/ | |
# Install stuff # | |
################# | |
# Install development tools and some misc. necessary packages | |
yum -y groupinstall "Development tools" | |
yum -y install zlib-devel # gen'l reqs |
#!/bin/bash | |
# INSTALL ORACLE INSTANT CLIENT # | |
################################# | |
# NOTE: Oracle requires at least 1176 MB of swap (or something around there). | |
# If you are using CentOS in a VMWare VM, there's a good chance that you don't have enough by default. | |
# If this describes you and you need to add more swap, see the | |
# "Adding a Swap File to a CentOS System" section, here: | |
# http://www.techotopia.com/index.php/Adding_and_Managing_CentOS_Swap_Space |
######################################### | |
## Prompt stylization and history sync ## | |
######################################### | |
bash_prompt_command() { | |
# Grab exit status of previous command | |
RTN=$? | |
prevCmd=$(prevCmd $RTN) | |
# Save and reload the history after each command finishes |
sudo apt-get update | |
# General development essentials | |
sudo apt-get install -y build-essential ssh git gitk | |
# Databases: You may not need all of these; | |
# none are explicit dependencies of other items in this script. | |
# SQLite and MySQL are pretty generally used for web development, | |
# and ODBC is just something we use at work. | |
sudo apt-get install -y sqlite |
#!/bin/bash | |
# SPECIFY THE VIRTUALENV YOU WANT TO INSTALL cx_Oracle TO # | |
########################################################### | |
# Change this to whatever you want, but note that this script isn't going to make the virtualenv for you. | |
# It assumes the environment already exists. | |
MY_VIRTUAL_ENV='dynamic' | |
# INSTALL ORACLE INSTANT CLIENT'S DEPENDENCIES # |
from UserDict import IterableUserDict | |
import collections | |
__author__ = 'github.com/hangtwenty' | |
def tupperware(mapping): | |
""" Convert mappings to 'tupperwares' recursively. |
import subprocess | |
import select | |
from logging import DEBUG, ERROR | |
def call(popenargs, logger, stdout_log_level=DEBUG, stderr_log_level=ERROR, **kwargs): | |
""" | |
Variant of subprocess.call that accepts a logger instead of stdout/stderr, | |
and logs stdout messages via logger.debug and stderr messages via | |
logger.error. |
Written with StackEdit.
Ordered by level of difficulty and probably age or experience of student, beginning with the easiest.