Skip to content

Instantly share code, notes, and snippets.

View joshtronic's full-sized avatar
🪦
Most forks are graves, not gardens

Josh Sherman joshtronic

🪦
Most forks are graves, not gardens
View GitHub Profile
- My Script
- [IF] Check if file exists
- Reads the file in
- [FOREACH] Loops through the data
- [IF] Check if the data is empty
- Processes the data
- [ELSE]
- Does some other stuff
- Closes the file
- [WHILE] Just a while loop
#!/usr/bin/env ruby
require 'rubygems'
require 'hpricot'
begin
# Reads in source created by viewing source on teuxdeux.com and saving it
# Use Firefox, as the Chrome view source mucks up the source
file = File.new('list.html', 'r');
adduser -d /home/user -m user admin
passwd user
#!/bin/bash
#
# Adobe Air Installer for Ubuntu 64-bit Systems
#
# Pretty sure the name says it all, but if not, here's some more detail. Adobe
# Air is currently only supported on 32-bit Linux systems. Because of this you
# have to jump through some hoops to get it running. Specifically, you need to
# install 32-bit libraries to satisfy the dependencies of Adobe Air. This
# particular script makes it as easy as running a single script.
#
menuentry "Linux Live CD" {
insmod ext2
set root='<strong>(hd1,1)</strong>'
loopback loop <strong>/linux-live-cd.iso</strong>
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=<strong>/linux-live-cd.iso</strong> noeject noprompt -
initrd (loop)/casper/initrd.lz
}
class Module {
function DoSomething() {
if (true) {
echo 'Done!';
} else {
echo 'Not done';
}
}
}
/home *(rw,sync,no_root_squash)
sudo apt-get remove network-manager network-manager-gnome
sudo apt-get install wicd
#!/bin/bash
# Assists in adding files currently not in a Subversion repository by
# automatically prompting you as to whether or not you want to add each
# file not currently in the repository
#
# @author Josh Sherman
# @link http://joshtronic.com
if [ -z "$1" ]; then
<?php
/**
* Smarty Age Calculator for PICKLES
*
* PICKLES is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*