Skip to content

Instantly share code, notes, and snippets.

View Lowest0ne's full-sized avatar

Carl Schwope Lowest0ne

View GitHub Profile
#include "game_of_life.h"
namespace GOL
{
Game::Game( const size_type width, const size_type height, const size_type spread )
: m_width( width )
, m_height( height )
, m_front( m_width * m_height )
, m_back( m_width * m_height )
, m_on_front( true )
@Lowest0ne
Lowest0ne / gist:e81ef597b16fe1f54a58
Created July 19, 2014 04:10
heroku log of droid's 'Browser' signing up with Devise 3.2.4 and Rails 4.1.2
2014-07-19T04:01:35.971565+00:00 heroku[router]: at=info method=GET path="/survivors/sign_up" host=safenet.herokuapp.com request_id=8f94c389-4d15-49ca-8cc7-5e0a557a338a fwd="98.229.128.161" dyno=web.1 connect=0 service=256 status=200 bytes=670
2014-07-19T04:01:35.972162+00:00 app[web.1]:
2014-07-19T04:01:35.972163+00:00 app[web.1]:
2014-07-19T04:01:35.972157+00:00 app[web.1]: view-4.1.2/lib/action_view/template/resolver.rb:45 (lambda)>>}, @default_proc=#<Proc:0x007fa1953a2828@/app/vendor/bundle/ruby/2.1.0/gems/actionview-4.1.2/lib/action_view/template/resolver.rb:46 (lambda)>>, "devise"=>#<ActionView::Resolver::Cache::SmallCache:0x007fa195894e80 @backend={"layouts"=>#<ActionView::Resolver::Cache::SmallCache:0x007fa1958949f8 @backend={false=>#<ActionView::Resolver::Cache::SmallCache:0x007fa1958947f0 @backend={[]=>[]}, @default_proc=nil>}, @default_proc=#<Proc:0x007fa1953a2850@/app/vendor/bundle/ruby/2.1.0/gems/actionview-4.1.2/lib/action_view/template/resolver.rb:45 (lambda)>>}, @default_proc=#<Proc:0x007fa1
QUESTION 3:
A customer sends us a text-format file that doesn't quite match our specification. In addition to containing lines that begin with IM, (as per the spec.), it also contains occasional lines beginning with FI. There is no pattern to where in the file these lines occur, but we need each line beginning with FI removed from the file. How would you go about modifying this file so we can use it?
$ sed -i '/^FI/d' customer_text_file.txt
@Lowest0ne
Lowest0ne / makefile
Last active January 2, 2016 08:39
A makefile to automatically know header prereqs.
sources=$(wildcard \
src/*.cpp
)
depends=$(sources:%.cpp=%.d)
objects=$(sources:%.cpp=%.o)
exec=prog
CXXFLAGS+=-std=c++11 -Wall -Wextra -pedantic -Werror
LDFLAGS+=
@Lowest0ne
Lowest0ne / number.txt
Created December 4, 2013 12:49
A random 1,000,000 digit long number, and a program to make it.
This file has been truncated, but you can view the full file.
7267325111562723119616800820945873625347495887410392074276473072334198059569400430657085944241607018933089029085250070785321683396109729623852579796087711880431253225300705974854654326726969096530263235923428093447219008229092128644148401402966610810655564996953369439571977558532817363972879106061118207183058430388906385315112245068078593359599689419960673897625623674920001061102199356768640224783375505623733264302198954176564803653325711237789908914333180590055489153488277187090643954123128986004364283921842006411835167156988314955269563775318611320155945987572029175454105096340355160670339851979636158859584721330317570456665748553560519183436489236283069734601157220331684423368018316311991007049075133677114135068619808131835035558838761374890982884997200906473578344483085075483994816126793240097655153673321830313927896312633390035515859132383606407231514846969620327261491881441367418925731615850676927225489718461575248320125304196820688770526793419361393026457341309497451242783631981285051807939978835159320
@Lowest0ne
Lowest0ne / main.cpp
Created November 10, 2013 01:15
delayed initialization in c++
#include <iostream>
int doIt( void )
{
std::cout << "here\n";
return 1234;
}
int size( void )
{