Skip to content

Instantly share code, notes, and snippets.

View blooalien's full-sized avatar
🎯
Focusing

Bloo Alien blooalien

🎯
Focusing
View GitHub Profile
@Aldarone
Aldarone / winestar.sh
Last active August 29, 2015 14:00
Wildstar launcher for Wine
#!/bin/bash
# Tested with wine-1.7.17
# Put this script and the Wildstar.exe installer in a directory
# Edit the VIDEO_MEMORY_SIZE according to your graphic card.
#
# At first launch, use `./winestar.sh install` and keep the default install directory
#
# Once the launcher is downloaded you can simply use ./winestar.sh
@briantissue
briantissue / gist:066587871f3abe3e6b77
Last active August 29, 2015 14:13
Check Your Server Disks---Over 90% Utilization
#!/bin/bash
#For checking disk space on our servers
#Clear Yesterday's Log
#Checking for root brought to you by Brad Arnold
if [ "$(whoami)" != "root" ]; then
echo "Not running as root. Exiting..."
echo "Please use sudo -s then run this script again as root."
@kdart
kdart / dirwatcher
Created March 10, 2015 07:34
Script to watch directory and launch hander.
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
"""
Watch for new downloads in ~/Downloads (or another directory) and take actions.
The actions are determined by the file extension (determining the mime type).
"""
from __future__ import absolute_import
from __future__ import print_function
@kdart
kdart / pywhich2
Created March 22, 2015 18:33
Python script that will tell you exactly what and were a module path is imported from.
#!/usr/bin/python2
# Tell you which object, and what kind, is obtained by an import. This can also
# Will return errorlevel of 2 if object is not found.
from __future__ import print_function
import sys
import imp
@wraithmonster
wraithmonster / install-couchdb.sh
Created February 17, 2012 17:46
Installs the latest CouchDB version on Ubuntu from source, not from a repository
#!/bin/bash
# Title: install-couchdb.sh
# Description: Installs the latest CouchDB version from source,
# not from a repository.
# Author: wraithmonster
# Reference: https://github.com/iriscouch/build-couchdb
# http://comments.gmane.org/gmane.comp.db.couchdb.user/16292
# Uninstalling from Ubuntu's repository:
# http://serverfault.com/questions/348044
# http://stackoverflow.com/questions/8783621
@wraithmonster
wraithmonster / install-node.sh
Created February 17, 2012 17:53
Installs node.js on Ubuntu
#!/bin/bash
# Title: install-node.sh
# Description: Installs node.js.
# Author: wraithmonster
# Reference: https://github.com/joyent/node/wiki/Installation
# Web framework - http://expressjs.com/
# Node Pkg Manager - https://github.com/isaacs/npm
#
################################################################################
@wraithmonster
wraithmonster / marmdir.sh
Created March 4, 2012 22:04
Archive the specified directory, then remove it
#!/bin/bash
################################################################################
#
# Title: marmdir.sh
# Description: Archive the specified directory, then remove it
# Author: wraithmonster
# Reference: http://www.apl.jhu.edu/Misc/Unix-info/tar/tar_28.html
# http://bit.ly/bash-string-length
# http://www.linux.com/archive/feature/120291
@wraithmonster
wraithmonster / strip-whitespace.sh
Created March 4, 2012 21:31
Strip whitespace & trailing slashes in bash
# References:
# http://bit.ly/bash-exit-status
# http://bit.ly/bash-remove-slash
# http://www.delorie.com/gnu/docs/wget/wget_27.html
# Strip whitespace
WS=`expr "$1" : '[[:space:]]*\(.*\)[[:space:]]*$'`
# Strip whitespace and remove any trailing slashes
WS_AND_SLASHES=`expr "$1" : '[[:space:]]*\(.*\)[[:space:]]*$' | sed -e 's/\\/$//g'`
# -*- coding: utf-8 -*-
import requests
from PySide import QtGui, QtCore
import sys
class AddressEdit(QtGui.QLineEdit):
def __init__(self, parent):
QtGui.QLineEdit.__init__(self, parent)
@Uradamus
Uradamus / compress_blend.sh
Last active April 28, 2016 21:50
Batch convert .blend files to gzip compressed .blend files.
for blend in *.blend; do
if [[ $(file -ib "$blend") == application/octet-stream* ]]; then
gzip -n1 "$blend"
mv "$blend.gz" "$blend"
fi
done