Skip to content

Instantly share code, notes, and snippets.

@jlambert121
jlambert121 / pr.md
Last active August 29, 2015 14:14 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@jlambert121
jlambert121 / pr.md
Last active August 29, 2015 14:12 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

Keybase proof

I hereby claim:

  • I am jlambert121 on github.
  • I am jlambert (https://keybase.io/jlambert) on keybase.
  • I have a public key whose fingerprint is BA7C 8BAC 07B5 9DA9 E7DF 6F51 CDDA E0A3 641F 4AAE

To claim this, I am signing this object:

#! /bin/bash
### BEGIN INIT INFO
# Provides: elasticsearch
# Required-Start: $all
# Required-Stop: $all
# Default-Start:
# Default-Stop: 0 1 6
# Short-Description: Starts elasticsearch
# chkconfig: - 80 15
# Description: Elasticsearch
@jlambert121
jlambert121 / pr.md
Created August 29, 2013 18:52 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

a = ['a', 'b', 'c']
a.each do |value|
puts value
end
# Outputs:
# a
# b
# c

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@jlambert121
jlambert121 / tomcat.sh
Last active December 19, 2015 14:18 — forked from valotas/tomcat.sh
#!/bin/bash
#
# tomcat7 This shell script takes care of starting and stopping Tomcat
#
# chkconfig: - 80 20
#
### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
Failures:
1) artifactory class with default parameters
Failure/Error: it { should create_class('artifactory') }
Puppet::Error:
Could not find class apache for jlambertmbp.local on node jlambertmbp.local
class activemq ($ensure = 'present') {
$real_ensure = $ensure
$real_enable = $real_ensure ? {
'present' => true,
default => false,
}
}