Skip to content

Instantly share code, notes, and snippets.

View gist:752273
#include <iostream>
class Physics
{
public:
void Update() { std::cout << "Physics!"; }
};
class Graphics
{
@ChrisLundquist
ChrisLundquist / magicka.lua
Created Jan 29, 2011
Magicka G15 script / macro
View magicka.lua
-- To use this script
-- 1) copy and paste this body into the script editor window and save it.
-- 2) Set each G Key in each M mode (that you want to use) to "script"
-- NOTE: Only G1 - G6 are configured since I am using the orange G15,
-- Extending this to 18 is just copy and paste.
-- If you are trying to record macros and they are not working, make sure you have
-- the record delay checkbox checked, however I find this script works better and
-- is more flexible than recording each macro by hand and adjusting the delay.
View gist:1268993
// Lab 2
// Jeff Heesch
// 10/5/11
// Purpose: To perform mathematical operations on two numbers
#include <iostream>
#include <cmath>
using namespace std;
int main()
View gist:1299663
#include <stdio>
int main()
{
for(int y = 1; y <= 50; y++){
for(int x = 1; x <= 3; x++){
std::cout << y*x << ","
}
std::cout << std::endl;
}
return 0;
@ChrisLundquist
ChrisLundquist / Week05Assig
Created Feb 5, 2012
Hadossa Oudean's Week05 Assignment
View Week05Assig
/*This program was created by Hadossa Oudean.*/
import java.io.*;
import javax.swing.*;
public class Week05 {
static File select;
static String path;
static boolean okay;
static boolean foundIt;
@ChrisLundquist
ChrisLundquist / iptc test
Created Feb 26, 2012
test for collectd dependency
View iptc test
/* gcc test.c -liptc -o a.out */
/* libiptc must be root to run since it maps kernel stuff, otherwise it segfaults */
#include <libiptc/libiptc.h> /* ip_t* */
int main(int argc, char** argv){
struct iptc_handle *handle = NULL;
handle = iptc_init("filter");
iptc_free(handle);
return 0;
}
View gist:2068313
This test works on Ruby 1.8.7, but blows up on ruby 1.9.2p318
< Some Test Fails >
wrong number of arguments (2 for 0)
< Path Snip >/gems/activesupport-2.3.14/lib/active_support/ordered_hash.rb:16:in `block in to_yaml'
<The offending line>
out.seq(taguri, to_yaml_style) do |seq|
fails because it is called from
View Assignment1
// Require Package
public class Assignment1 {
public static void main(String[] argv){
// get package count
// packages = array of packages
// cost = 0;
View Package.cs
public class Package {
private double Height, Length, Width, weight;
private bool air = false;
public double Height
{
get { return Height; }
set { Height = value; }
}
public double Length
View gist:2918213
public void SavingFile()
{
StreamWriter writer = new StreamWriter("books.txt");
foreach (Book book in books)
{
writer.WriteLine(book.ToString());
}
}