Skip to content

Instantly share code, notes, and snippets.

@leffuy
leffuy / Reggers.java
Created May 1, 2011 21:35
A regular expression test with newlines
import java.util.regex.Pattern;
public class Reggers{
public static void main(String[] args){
String newWorld = "Hello there \n \n";
//test for newline recognition in bash terminal
System.out.println(newWorld);
@leffuy
leffuy / RawOutput
Created May 1, 2011 21:32
Regular Expression Test with Java see additional file
leflor@machine-7:~/codeground/My_Room/rand$ java Reggers
Hello there
Hello
there
bro
there
@leffuy
leffuy / gist:842997
Created February 24, 2011 22:09
InceptionLog
leflor@white-Shadow:~/code-workshop/inception$ ./inception
Dreamer [Fischer], level [1], priority [0], policy [OTHER]
Dreamer [Cobb], level [1], priority [0], policy [OTHER]
Dreamer [Arthur], level [1], priority [0], policy [OTHER]
Dreamer [Yusuf], level [1], priority [0], policy [OTHER]
Dreamer [Eames], level [1], priority [0], policy [OTHER]
Dreamer [Ariadne], level [1], priority [0], policy [OTHER]
Dreamer [Saito], level [1], priority [0], policy [OTHER]
[Fischer] HIJACKED ! Open up my defense projections in my dream to the hijackers!
[Cobb] sees Fischers defense projections at work in the dream at level [1]
@leffuy
leffuy / mattdaemon.txt
Created January 28, 2011 08:10
Look how nice I was, I printed you a man page digitally.
leflor@machine-7:~/codeground/Droid-Net$ man daemon
DAEMON(3) Linux Programmer's Manual DAEMON(3)
NAME
daemon - run in the background
SYNOPSIS
#include <unistd.h>
FILE pong-core.cpp:
#include <stdlib.h>
#include "SDL.h"
int main(int argc, char *argv[]){
//Initialize SDL Library
printf("Init Library\n");
#include <stdio.h>
int main ()
{
float mph;
float kph;
printf( "Enter speed in mph: " );
scanf("%d", &mph);
kph == (mph * 1.609344);
//Changelog:
//Use diff to see my changes
// SortingAlgorithms.java
import java.util.Random;
/** HW7 Sorter class. You will call this from your Driver class to
* measure your different sorts.*/
public class SortingAlgorithms {
/**
#!/usr/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
@leffuy
leffuy / gist:446201
Created June 20, 2010 23:09
Python Script manually given to Steam interpreter and resulting output.
>>> import os
>>> import sys
The thread 'Win32 Thread' (0x22a0) has exited with code 0 (0x0).
>>> path='C:/python26/python.exe'
>>> args='ttsPort.py'
>>> print(path)
@leffuy
leffuy / BoostExample.cpp
Created June 13, 2010 19:18
ConCommand to handle evaluation
//Basically you create a new CONsoleCOMMAND in the engine by issuing the following
//This one is for creating a console command that sends strings to the python interpreter
CON_COMMAND(pySrc, "Evaluale a python expression")
{
if ( !UTIL_IsCommandIssuedByServerAdmin() )
{
Msg( "You must be a server admin to use that command\n" );
return;
}