Skip to content

Instantly share code, notes, and snippets.


James Thompson plainprogrammer

View GitHub Profile
View gist:a969479a6bcc4fc57277d590a2deae4d
gqqmeYc8GwQ3NTc 8gqsearOP49PyHx HziRXWYQjNAT1cB faoSOEjRYkhk6aS
kNh4l3WiC5eMSFI 23hjolMGkx4TCKq 6Xr2MZHgg6nv2OV 6Tbea16Nd6GONPl
Bfq3hFlI9BQktVE gXBbfgfw6bXCszy dPYFXr9JwD1nAOL 3j2TF5lR5HOkUY8
2bvbpvJwznjAgMG xiw2FOCIYiDH2rP KbigE1N5kVsSvb2 JIGj.

Keybase proof

I hereby claim:

  • I am plainprogrammer on github.
  • I am plainprogrammer ( on keybase.
  • I have a public key ASBc2-7Zt54OhRy1XbbESbRzPIL36TuAmOryyeOo58WWiwo

To claim this, I am signing this object:


Vineyard charter school under state scrutiny

Braley Dodson Daily Herald 17 hrs ago

The State Charter School Board, part of the Utah State Board of Education, did not take any action on closing a charter school Friday evening after concerns of student safety were brought forward.

The state charter board met to consider taking action on Franklin Discovery Academy in Vineyard, which opened Aug. 22 and teaches about 500 students in kindergarten through sixth grade. However, the board was ultimately unable to act on the matter because it did not issue a notice for the meeting 24 hours in advance.

The board has scheduled a meeting for 7 p.m. Saturday where possible action could be taken, which could include giving the school a warning, putting it on probation, allowing another entity to take over the school or voting to terminate the school.

View gist:0519246455dcd0875814
rev_10_file ='rev_10.rev', 'a')
rev_172_file ='rev_172.txt', 'w+')
rev_192_file ="rev_192.txt", "w+")
Dir['/Users/andybaxter/bind/*.com'].each do |filename|, 'r+').readlines.each do |line|
domain = line.split.first
ip = line.split.last
View AssigneesFilterTest.rb
current_user = User.where(full_name: "Jane Fonda").first
current_user.connections.where("full_name LIKE ?", "%bus%").select(:id, :full_name)
# User Load (0.6ms)
# SELECT `users`.`id`, `users`.`full_name` FROM `users`
# INNER JOIN `contacts` ON `users`.`id` = `contacts`.`connection_id`
# WHERE `contacts`.`user_id` = 980204181
# AND (full_name LIKE '%bus%')
# => #<ActiveRecord::AssociationRelation [
plainprogrammer / scary_service.rb
Last active Oct 28, 2015
Scary Reorder Service
View scary_service.rb
module Services
module Column
class Reorder
attr_reader :column_to_move, :column_before, :column_set
def initialize(column_to_move_id, column_before_id = nil)
@column_to_move = ::Column.find(column_to_move_id)
@column_before = ::Column.find(column_before_id) if column_before_id.present?
@column_set = @column_to_move.column_set
View .bash_profile
%{$PROMPT_SUCCESS_COLOR%}%~%{$reset_color%} %{$GIT_PROMPT_INFO%}$(git_prompt_info)%{$GIT_DIRTY_COLOR%}$(git_prompt_status) %{$reset_color%}%{$PROMPT_PROMPT%}ᐅ%{$reset_color%}

Keybase proof

I hereby claim:

  • I am plainprogrammer on github.
  • I am plainprogrammer ( on keybase.
  • I have a public key whose fingerprint is BF75 7722 AE10 7AE8 4C85 9DE5 5A1F 973B AEB0 18AF

To claim this, I am signing this object:

plainprogrammer / example.rb
Created Nov 22, 2014
Renewable Objects (Immutability by Default) — A more Functional way to do OOP
View example.rb
class Person
include Renewable
attr_accessor :name, :age
def celebrate_birthday
self.renew(age: age + 1)
john = 'John', age: 24)
plainprogrammer / PlainBot.rb
Last active Aug 29, 2015
plainprogrammer's RRobot tank-bot
View PlainBot.rb
class PlainBot
include Robot
def tick(events)
turn(2) if (time % turn_adjust == 0)
if events['robot_scanned'].empty?
closest = events['robot_scanned'].sort.pop.pop
You can’t perform that action at this time.