Skip to content

Instantly share code, notes, and snippets.

View tylersamples's full-sized avatar
🏠

Tyler Samples tylersamples

🏠
View GitHub Profile
@tylersamples
tylersamples / .editorconfig
Last active August 3, 2016 02:07
General .editorconfig
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
#include <stdlib.h>
#include <time.h>
#include <iostream>
int main(int argc, char** argv)
{
srand (time(NULL));
std::cout << rand() % 100 + 1 << std::endl;
# make test
Running tests...
Test project /home/gnomy/entityx/branches/no-boost/build
Start 1: entity_test
1/5 Test #1: entity_test ...................... Passed 0.01 sec
Start 2: event_test
2/5 Test #2: event_test ....................... Passed 0.00 sec
Start 3: system_test
3/5 Test #3: system_test ...................... Passed 0.00 sec
Start 4: tags_component_test
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
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:
x=0
while x < 20:
if x < 4:
x = x+1
break # remove
else:
y = 0
while y<2:
x = x+x
<?php
/*
Multiple
Line
Comment
*/
/* Generally you see it
* with the *'s
* when it is dictating a copyright header
@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)
int num = 0;
void addOne(int& n)
{
n++;
}
// another way to write addOne
int addOne(int n)
/*
g++ ns.cc -o ns && ./ns
*/
#include <iostream>
const float currentNS = 762677;
const float avgDailyGrowth = 0.005274;
int main()