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
import logging | |
import time | |
logger = logging.getLogger(__name__) | |
def useful(): | |
logger.debug('Hello from webapplib!') | |
time.sleep(0.01) |
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
jQuery.validator.addMethod("dateGreaterThan", function (value, element, params) { | |
if (!/Invalid|NaN/.test(new Date(value))) { | |
return new Date(value) > new Date($(params).val()); | |
} | |
return isNaN(value) && isNaN($(params).val()) | |
|| (Number(value) > Number($(params).val())); | |
}, '<br />Must be greater than {0}.'); | |
jQuery.validator.addMethod('greaterThan', function (value, element, param) { |
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
sudo apt-get remove nvidia* && sudo apt-get autoremove | |
This went well, no errors. Then I added a new file, /etc/modprobe.d/nouveau.conf | |
blacklist nouveau | |
blacklist lbm-nouveau | |
options nouveau modeset=0 | |
alias nouveau off | |
alias lbm-nouveau off |
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
#git pull ssh+git://<login>@git.<datacenter>.gpaas.net/default.git | |
mkdir -p MyWebApp && cd MyWebApp | |
virtualenv venv | |
source venv/bin/activate | |
pip install bottle | |
pip freeze > requirements.txt | |
cat > hello.py <<EOF | |
# -*- coding: utf-8 -*- |
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/bash | |
#=============================================================================== | |
# | |
# FILE: iso2wbfs | |
# | |
# USAGE: ./iso2wbfs [option] FILE... [wbfs directory] | |
# | |
# DESCRIPTION: Uses wit to convert one or more Wii ISO into a WBFS file | |
# properly named for use on non-WBFS partitions. | |
# |
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
#note, do wodim --devices to find the correct device | |
cdirip image.cdi -wodim | |
wodim dev=/dev/sg0 speed=8 -multi -audio taudio01.wav && rm taudio01.wav | |
wodim dev=/dev/sg0 speed=8 -multi -xa tdata02.iso && rm tdata02.iso | |
eject |
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
sudo mount /dev/sda1 /mnt | |
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done | |
sudo grub-install --root-directory=/mnt/ /dev/sda | |
sudo chroot /mnt | |
apt-get re-install 'linux-image-4.4*' | |
updateinitrams -u -k all | |
update-grub | |
exit | |
reboot |
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
#Steps taken from http://bobbyromeo.com/technology/backup-clone-raspberry-pi-sd-card/ | |
#On your RaspberryPI live system, do these steps. Have your target sd card unmounted | |
#in a SD card reader attached to one of the USB ports. | |
git clone https://github.com/billw2/rpi-clone.git | |
cd rpi-clone | |
cp rpi-clone /usr/local/sbin | |
sudo rpi-clone sdb -v -x |
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
Projects with external data outside of the working directory will have probems (i.e., java.lang.nullexception) if you use the default external console. Go to Project properties -> Run -> Console Type and select Standard Output. |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.stormgames.web</groupId> | |
<artifactId>web</artifactId> | |
<packaging>war</packaging> | |
<version>0.0.1</version> | |
<name>Struts2 Example</name> | |
<properties> |