Skip to content

Instantly share code, notes, and snippets.

View insidenothing's full-sized avatar
💭
in the clouds

Patrick McGuire insidenothing

💭
in the clouds
View GitHub Profile
tar -pczf repo.tar.gz repo/
function printAD($id,$ip){
$r=@mysql_query("select LiveAdHTML from schedule_items where schedule_id = '$id'");
$d=mysql_fetch_array($r,MYSQL_ASSOC);
$myFile = "/data/auction/adMaster/$id.html";
$fh = fopen($myFile, 'w') or die("can't open file");
fwrite($fh, $d[LiveAdHTML]);
fclose($fh);
passthru('/usr/local/bin/html2ps /data/auction/adMaster/'.$id.'.html > /data/auction/adMaster/'.$id.'.ps');
$file = /data/auction/adMaster/$id.'.ps';
$remote_file = $id.'.ps';
@insidenothing
insidenothing / docpdf.hold.php
Created October 19, 2010 13:59
main doc / pdf code
<?
ini_set('error_reporting',E_ERROR | E_WARNING | E_PARSE);
ini_set('display_errors','On');
include 'dptc.log.php';
mysql_connect();
mysql_select_db('intranet');
function addNote($id,$note){
$q1 = "SELECT notes FROM schedule_items WHERE schedule_id = '$id'";
$r1 = @mysql_query ($q1) or die(mysql_error());
$d1 = mysql_fetch_array($r1, MYSQL_ASSOC);
@insidenothing
insidenothing / Git Loop
Created October 20, 2010 13:38
Create folder on desktop, name it exactly after the repository.
Right click on folder “Git Bash Here”
git init
(this will get the folder ready for git usage)
git pull [repo ssh string] master
(this will pull the master/head from github)
git add -A
(this will add all new files)
@insidenothing
insidenothing / Nightly Branch Instructions
Created November 29, 2010 21:31
The basic on how to branch.
Review:
At this point you should have a local copy of the master, up to date.
Create the branch, push it, use it
$ git branch nightly
$ git push [git@github.com:...] nightly
$ git checkout nightly
(work your files)
@insidenothing
insidenothing / git-on-centos.txt
Created January 18, 2011 02:54
build git on centos 5.5
cd /downloads
wget http://kernel.org/pub/software/scm/git/git-1.6.6.tar.gz
tar xvzf git-*.tar.gz
cd git-*
make configure
./configure --prefix=/usr --without-tcltk
make all
make install
@insidenothing
insidenothing / epel on centos5.5
Created January 18, 2011 03:20
rebuilding server, getting yum going straight
In order to install EPEL take the following steps:
1. rpm -ivh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
@insidenothing
insidenothing / php binary info
Created January 18, 2011 03:26
good sites dealing with server setup
http://wiki.centos.org/HowTos/PHP_5.1_To_5.2
@insidenothing
insidenothing / rgb_spectrum.c
Created September 29, 2015 01:00 — forked from jimsynz/rgb_spectrum.c
Arduino sketch to cycle an RGB LED through the colour spectrum.
const int redPin = 11;
const int greenPin = 10;
const int bluePin = 9;
void setup() {
// Start off with the LED off.
setColourRgb(0,0,0);
}
void loop() {
hello world