Skip to content

Instantly share code, notes, and snippets.

View ParkinT's full-sized avatar

Thom Parkin ParkinT

View GitHub Profile
@ParkinT
ParkinT / prime_year.rb
Last active August 29, 2015 14:12
On the very last day of 2014 I was struck by a thought: Which years - in all of history - are represented by Prime numbers? I intend to expand this with other analyses.
require 'date'
require 'prime'
0.upto(Date.today.year) do | y |
str = y.to_s
upper = str.to_i
prime_year, prime_parts = ''
lower = 2 #non prime in order to fail final 'if'
begin
upper = (str[0..str.size-3]).to_i
@ParkinT
ParkinT / SocialMedia_CyberSecurity.md
Created December 22, 2014 11:59
Social Media Security Tips to protect your identity as defined by the US Army for all DoD personnel and contractors who work on DoD projects.
@ParkinT
ParkinT / Dockerfile_base
Last active August 29, 2015 14:09
An Implementation of Docker for Serial Rails Development and Deployment.
FROM ubuntu:14.10
MAINTAINER Thom Parkin, Thom.Parkin@Websembly.com
# Rails with Nginx and Passenger - Read the article on RubySource.com
# Update local OS
RUN apt-get update
RUN apt-get upgrade -y
# Install dependencies
@ParkinT
ParkinT / DoctorHyde.md
Last active August 29, 2015 14:08
The head of a large Pharmaceutical company faces difficult decisions each day. Can you help?

STJ read Dr Hyde’s letter and stroked his chin as he contemplated his choice. It’s not one to be made lightly, after all his decision will determine his future. His thoughts are interrupted by his secretary.

“The investors’ meeting starts in fifteen minutes,” she announces before retreating and closing the door behind her.

His eyes narrow as he looks around his plush office. He gathers his paperwork, ready to leave when the door opens again, startling him. It’s Dr Hyde.

“I’m sure you’ve seen my letter. Time we talked business,” he gushes out, rubbing his hands together as if it’s already a done deal.

Do you think STJ should:

@ParkinT
ParkinT / Saving Rhys.md
Last active August 29, 2015 14:07
You are thrust into a difficult and deadly situation entirely by chance. Can you make the right decisions to save a man's life and YOUR OWN?

The smoke emitting from my cheap cigarette dances aimlessly as it ascends further up; I watch until it disappears completely leaving behind no entrails. Tonight was not particularly chilly, sixty-three degrees and mid-December in New York. The streets are busier than ever; nice weather made even the laziest New Yorker go out and walk their own dog.

I worked at a crummy hole in a wall joint, Ricky's, where our usuals consisted of overweight businessmen looking for a good time with the local lady of the evening.

Sonia Gomez, an over-dyed blond with a poorly stitched weave job, sticks her head out of the back door, "Lily!" she screeches with her Latino accent, which in this case sounded like dying cows. I wonder if I hid my distaste for her as amicably as I would have liked. "Meester Josue wants you back right now!" I look back; her yellow head had disappeared. I also noticed while she slammed the door shut its stopper had disappeared within. The back alleyway door to Ricky's locked from the outside and the o

@ParkinT
ParkinT / DockerCLIalias
Last active August 29, 2015 14:07 — forked from caike/Dockerfile
# ~/.bash_aliases
# Kill all running containers.
alias dockerkill='docker kill $(docker ps -a -q)'
# Delete all stopped containers.
alias dockercleanc='printf "\n>>> Deleting stopped containers\n\n" && docker rm $(docker ps -a -q)'
# Delete all untagged images.
alias dockercleani='printf "\n>>> Deleting untagged images\n\n" && docker rmi $(docker images -q -f dangling=true)'
@ParkinT
ParkinT / gitAlias
Created September 13, 2014 19:36
A list of example git alias shortcuts from the "Mastering Git" [ISBN 978-1-78355-413-3] book by Packt Publishing. This is described in Section 7.
### Common Commands
ssb = status -sb
logo = log --oneline
c = commit -m
a = add
cob = checkout -b
st = status -s
co = checkout
stat = status
cl = clone
@ParkinT
ParkinT / InteractiveAdventure.md
Last active June 23, 2016 00:56
An Interactive Fictional Story is one where you do not merely observe the action but take an active part in it. As with real life, your decisions have a direct effect on the outcome of the story.

Welcome!

This is merely an example. This short and very simplistic adventure illustrates the concept and the technology involved; including technology challenges which I faced and overcame.

You are strongly encouraged to provide honest comments and suggestions. If you feel the burning desire to write a multi-faceted story, in any genre you please, be sure to make contact and it can be featured here in this manner.

Thanks for your time, interest and feedback.

===

@ParkinT
ParkinT / RailsSites.md
Last active August 23, 2016 00:33
Over the life of the Internet I have created innumerable web sites (many corporate 'internal' sites) and many have become extinct. After discovering Ruby-on-Rails (around 2006) I have become a Serial Rails Developer. When asked "What have you done?" I am at a loss for more than the site on which I most recently worked. This is my personal invent…

Thom Rails Sites

Over the life of the Internet I have created innumerable web sites (many corporate 'internal' sites) and many have become extinct. After discovering Ruby-on-Rails (around 2006) I have become a Serial Rails Developer. When asked "What have you done?" I am at a loss for more than the site on which I most recently worked. This is my personal inventory of Rails Sites (simply as a memory aid for me).