Skip to content

Instantly share code, notes, and snippets.

View tylersamples's full-sized avatar
🏠

Tyler Samples tylersamples

🏠
View GitHub Profile
@tylersamples
tylersamples / camera.cpp
Last active December 15, 2015 16:29
Click to move
#include <Camera.h>
Camera::Camera(void):
m_Model(glm::mat4(0)),
m_View(glm::mat4(0)),
m_Projection(glm::mat4(0))
{
}
Camera::~Camera(void)
@tylersamples
tylersamples / cn.py
Created June 25, 2013 05:14
CN Python Example 1
nations = []
nations.append({"nationID": 12234, "nationName": "Python Nation", "nationRuler": "pyRuler"})
nations.append({"nationID": 13254, "nationName": "Other Nation", "nationRuler": "ermagerd"})
for nat in nations:
print nat["nationID"]
print nations
<?php
echo "Yep, PHP can be ran";
?>
/*
g++ ns.cc -o ns && ./ns
*/
#include <iostream>
const float currentNS = 762677;
const float avgDailyGrowth = 0.005274;
int main()
int num = 0;
void addOne(int& n)
{
n++;
}
// another way to write addOne
int addOne(int n)
@tylersamples
tylersamples / do.py
Last active December 22, 2015 21:09
num = 0
def addOne(n):
n = n + 1
return n
print num
num = addOne(num)
<?php
/*
Multiple
Line
Comment
*/
/* Generally you see it
* with the *'s
* when it is dictating a copyright header
x=0
while x < 20:
if x < 4:
x = x+1
break # remove
else:
y = 0
while y<2:
x = x+x
num=0
while True: # loop 1
if num==6:
while True: # loop 2
if num>20:
break # breaks out of loop 2
num = num + 2
if num==100:
g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.1-20130603/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.1-20130603/obj-x86_64-redhat-linux/clo