Skip to content

Instantly share code, notes, and snippets.


J. Mark Locklear marklocklear

View GitHub Profile
View sample java
package blarg;
* @author marklocklear
public class Blarg {
* @param args the command line arguments
View Deploy a Rails App with Passenger and Nginx on Ubuntu

sudo apt-get update sudo apt-get upgrade

useradd deployer -G admin -m -s /bin/bash passwd deployer

#if digital ocean droplet may need to change PasswordAuthentication from no to yes in /etc/ssh/sshd_config before you can ssh-copy-id PasswordAuthentication yes sudo service sshd restart

View gist:4b79d7a0195b02db6decfa6256fde089
class Coursera
include HTTParty
def self.for term
{query: {term: term}, format: :json})

Ubuntu 16 - Capistrano - Nginx + Passenger

1. Create Server

Add deployer user

groupadd admin
useradd deployer -G admin -m -s /bin/bash
passwd deployer
marklocklear /
Last active Dec 19, 2017 — forked from orendon/
Bare Metal Linux - Rails Capistrano - Nginx + Passenger tux

Digital Ocean Ubuntu 14.04 - Capistrano - Nginx + Passenger

1. Create droplet

Add deployer user

groupadd admin
useradd deployer -G admin -m -s /bin/bash
passwd deployer
marklocklear / gist:5757086
Last active Dec 18, 2015
Summer of Rails
View gist:5757086
Week 4
>rails g migration add_completed_to_ideas completed:boolean
<div class="field">
<%= f.label :completed %><br />
<%= f.check_box :completed %>
>rails g migration add_range_to_ideas range:integer
<div class="field">
View gist:5665482
require 'brewery_db'
brewery_db = do |config|
config.api_key = 'b7a3521dc50ce9c2e6c675dd896c276a'
abv = brewery_db.beers.all(abv: '5.5')
abv.each do |b|
View gist:5491006
require "./include.rb"
@board =
@board = {'ul' => 'ul', 'um' => 'um', 'ur' => 'ur',
'ml' => 'ml', 'mm' => 'mm', 'mr' => 'mr',
'll' => 'll', 'lm' => 'lm', 'lr' => 'lr'}
puts "Enter a move in the following sequence\n
View gist:5491002
def show_board
count = 0
@board.each { |key, value|
print "#{value}" + " | "
if count == 2 or count == 5 then print "\n______________\n" end
count += 1
print "\n"
View gist:4111359
A big thank you to anyone who has donated already - it is very truly appreciated.
My brother Nate is fighting stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (unpaid FMLA), no insurance coverage, and cannot afford treatment. Nate and his family need your help. Thank you.
Josh Goebel, Pastie creator
Donate now Read Nate's story Hide this message
Pastie Pastie << self Blog
You can’t perform that action at this time.