Skip to content

Instantly share code, notes, and snippets.

View jsuwo's full-sized avatar

Jeff Shantz jsuwo

View GitHub Profile
@jsuwo
jsuwo / lxc-centos.patch
Created July 28, 2015 20:55
Patch to update CentOS template in lxc-templates-1.0.7-1.el7.x86_64 to latest version (as of 2015-07-28)
--- lxc-centos 2014-12-07 13:23:40.000000000 -0500
+++ lxc-centos-new 2015-07-28 15:58:57.110168646 -0400
@@ -29,7 +29,7 @@
#Configurations
default_path=/var/lib/lxc
-# Some combinations of the tunning knobs below do not exactly make sense.
+# Some combinations of the tuning knobs below do not exactly make sense.
# but that's ok.
#
@jsuwo
jsuwo / 01-test.c
Created October 21, 2015 20:45
Simple syslog example
#include <syslog.h>
#include <stdlib.h>
#include <unistd.h>
int main()
{
openlog("fig3-7", LOG_PERROR | LOG_PID | LOG_NDELAY, LOG_USER);
syslog(LOG_NOTICE, "Hello Syslog!");
syslog(LOG_INFO, "Here's an informational message.");
syslog(LOG_WARNING, "Here's a warning.");
@jsuwo
jsuwo / Makefile
Last active November 9, 2015 04:32
Code samples from Computer Networks I Lab Manual, Chapter 5 - UDP Socket Programming
CC=gcc
CFLAGS=-Wall -Werror -std=gnu11 -g -c
LFLAGS=-Wall -Werror -g
all: fig5-3 fig5-4 fig5-5 server client
fig5-3: fig5-3.o udp_sockets.o udp_server.o
$(CC) $(LFLAGS) -o $@ $^
fig5-4: fig5-4.o udp_sockets.o udp_server.o
@jsuwo
jsuwo / Makefile
Last active November 9, 2015 04:32
Code samples from Computer Networks I Lab Manual, Chapter 6 - More Advanced Socket Programming
CC=gcc
CFLAGS=-Wall -Werror -g -c
LFLAGS=-Wall -Werror -g
all: client1 client2 client3 server1 server2 server3 endian poll
client%: client%.o udp_sockets.o udp_client.o
$(CC) $(LFLAGS) -o $@ $^
server%: server%.o udp_sockets.o udp_server.o
@jsuwo
jsuwo / README.md
Last active December 23, 2015 07:09

Working with Ruby on the MC 10 systems

While it is possible to install Ruby on a system-wide basis, it is much more common amongst the Ruby community to use a tool called rvm (Ruby Version Manager) to build and install Ruby and to manage the installation of Ruby gems (libraries). This tutorial will get you started with RVM on the MC 10 systems.

Prerequisites

This tutorial assumes:

  • You are working on one of the Linux systems in MC 10. Do not attempt this on obelix.
  • You have at least 100 - 200 MB of free space in your GAUL account, depending on the Ruby gems that you install. You have at least 1 GB of quota, so this shouldn't be much of a hardship for you. If you need more quota to make this work, contact Jeff at [x@y, where x = jeff, y = csd.uwo.ca].
@jsuwo
jsuwo / LEXT620.PPD
Created October 30, 2013 18:05
PPD file for the Lexmark T620 printer.
*PPD-Adobe: "4.3"
*% Adobe PostScript(R) Printer Description File
*% For Lexmark T620 Laser Printers
*% Produced by Lexmark International, Inc.
*%
*% For use with Adobe PostScript Driver ver 3.0.1 or similar printer drivers
*%
*% Copyright (c) 1993-2001 Lexmark International Inc. All Rights Reserved.
*% Permission is granted for redistribution of this file as
*% long as this copyright notice is intact and the content
@jsuwo
jsuwo / LEXT640.PPD
Created October 30, 2013 18:04
PPD file for the Lexmark T640 printer.
*PPD-Adobe: "4.3"
*%
*% For information on using this, and to obtain the required backend
*% script, consult http://www.openprinting.org/
*%
*% This file is published under the GNU General Public License
*%
*% PPD-O-MATIC (4.0.0 or newer) generated this PPD file. It is for use with
*% all programs and environments which use PPD files for dealing with
*% printer capability information. The printer must be configured with the
@jsuwo
jsuwo / XRX8860.PPD
Created October 30, 2013 18:07
PPD file for the Xerox Phaser 8860 printer.
*PPD-Adobe: "4.3"
*% Xerox Corporation (R) Printer Description File
*% Copyright Xerox Corporation
*% Copyright Adobe Systems, Inc.
*% All Rights Reserved.
*% Date: 07/09/07
*% OPB Build Number: 1.0.4
*% PPD for Windows PPD Only Driver, English
*FormatVersion: "4.3"
*FileVersion: "1.0"
@jsuwo
jsuwo / LEXT630.PPD
Last active December 27, 2015 00:19
PPD file for the Lexmark T630 printer.
*PPD-Adobe: "4.3"
*% Adobe PostScript(R) Printer Description File
*% For Lexmark T630 Laser Printers
*% Produced by Lexmark International, Inc.
*%
*% For use with Adobe (formerly Aldus) PageMaker
*%
*% WARNING: If you edit this file and use it with PageMaker, be sure to
*% use an editor (such as DOS Edit) that does NOT add an end-of-file
*% marker (hex 1A) when it stores the file
@jsuwo
jsuwo / LEXT650.PPD
Created October 30, 2013 18:15
PPD file for the Lexmark T650 printer.
*PPD-Adobe: "4.3"
*% PPD file for Lexmark T650 with CUPS.
*% Created by the CUPS PPD Compiler v1.2.3.
*%
*% Adobe PostScript(R) Printer Description File
*%
*% start_copyright
*% Produced by Lexmark International, Inc.
*%
*%