Skip to content

Instantly share code, notes, and snippets.

Joseph Bass jab416171

Block or report user

Report or block jab416171

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Ubuntu 12.04, Ruby, Rails, Nginx, Unicorn and git-deploy

In the seemlingly endless search for the actual correct and easy way to deploy a Rails app, we have tried several ways. We tried out using Apache2 and running a cluster of Thin servers. With the built in threading of Puma we decided to use it with Nginx.

Server Setup

  • Create new server
  • Login to new server
    • ssh username@IPaddress (you can also use the domain name if you have the DNS setup already)
    • accept the RSA key
public List<Snippet> listSnippets() throws IOException {
File[] files = DIRECTORY.listFiles(new FileFilter() {
public boolean accept(File file) {
return file.isFile() && !file.isHidden();
List<Snippet> result = Collections.emptyList();
if(files != null) {
View index.php
if(strpos($_SERVER["HTTP_HOST"],"kmobs")) {
header('Location: kmobsmod/index.php');
else */
if (strpos($ua,"Android")) {
header ('Location: index_android.php');
View gist:6768787
tar zxvf node-latest.tar.gz
cd node-v0.10.18/
make install
View gist:7163973
Status Code: 500
Exception: java.lang.NullPointerException
javax.servlet.ServletException: java.lang.NullPointerException
at org.kohsuke.stapler.Stapler.tryInvoke(
at org.kohsuke.stapler.Stapler.invoke(
at org.kohsuke.stapler.MetaClass$6.doDispatch(
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(
at org.kohsuke.stapler.Stapler.tryInvoke(
jab416171 / gist:7164949
Created Oct 26, 2013
git clone failing occassionally
View gist:7164949
SimpleGit: checking out
Clear Workspace enabled: deleting contents of /jenkins/workspace/Commit_pr.
- Executing: `/usr/bin/git clone git+ssh:// .`
hudson.util.IOException2: remote file operation failed: /jenkins/workspace/Commit_pr at hudson.remoting.Channel@4274d50:commit-853
at hudson.FilePath.act(
at hudson.FilePath.act(
at com.joelj.jenkins.Git.executeCommand(
at com.joelj.jenkins.Git.cloneRepo(
at com.joelj.jenkins.SimpleGitScm.checkout(
at hudson.model.AbstractProject.checkout(
package com.garagze;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
#!/usr/bin/env python2
# python2 < accounts.txt > registered.txt
# format accounts.txt like 'username:password:email'
import requests
import sys
accounts = [a.split(":") for a in"\n") if a.strip() != ""]
base = ""
for account in accounts:
public class DrawingPanel extends SurfaceView implements SurfaceHolder.Callback {
private final Drawable mCustomImage;
public void onDraw(Canvas canvas) {
mCustomImage.setBounds(new Rect(0, 0, 50, 50));
# � 2010 Western Digital Technologies, Inc. All rights reserved.
# Note: this is called by cron
You can’t perform that action at this time.