Skip to content

Instantly share code, notes, and snippets.

View Spaceghost's full-sized avatar
👻
Building distributed and decentralized systems that run in the browser

Johnneylee Jack Rollins Spaceghost

👻
Building distributed and decentralized systems that run in the browser
View GitHub Profile

How-to setup a simple git push deployment

These are my notes basically. I first created this just as a reminder for myself. Feel free to use this for your project as a starting point.

On the server (example.com)

  1. Create a user on example.com, as which we (the git client) connects (push) to exmaple.com.
sudo useradd -m -s /usr/bin/git-shell git
class UserCreator
def initialize(listener)
@listener = listener
end
def create(attributes)
user = User.new(attributes)
if user.save
# send email
commit 95bcc8ac6463e63001b33094ede2e21796da6c23
Author: Johnneylee Jack Rollins <Johnneylee.Rollins@gmail.com>
Date: Mon Jun 30 07:17:59 2014 -0700
Add Callable and Bindable for services/controllers
* Callable depends on the extending class implementing #call as an
instance method. Another instance method name might be preferable, I
don't know. I've even seen fun dynamic things like `extend
Callable.call_method(:execute)`
# JS config for NVIDIA SHIELD
# Axes:
# -----
# 1 Left stick H
# 2 Left stick V
# 3 Left trigger
# 4 Right stick H
# 5 Right stick V
# 6 Right trigger
# 7 Pad H
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.macports.gpg-agent</string>
<!-- Please uncomment on 10.4; OnDemand doesn't work properly there. -->
<!--
<key>OnDemand</key>
@Spaceghost
Spaceghost / pr.md
Last active August 29, 2015 14:11 — 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:

@Spaceghost
Spaceghost / .README.md
Last active August 29, 2015 14:11 — forked from gnarf/..git-pr.md

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from GitHub remotes:

  • git pr 4 - creates local branch pr/4 from the origin remote and checks it out
  • git pr 4 upstream - creates local branch pr/4 from upstream remote and checks it out
@Spaceghost
Spaceghost / how to install entware on ARM.md
Last active August 29, 2015 14:26 — forked from dreamcat4/how to install entware on ARM.md
Install entware on ARM based router eg tomato / ddwrt / asus-merlin cfw
@Spaceghost
Spaceghost / Role.rb
Created December 25, 2010 17:24 — forked from joshrendek/Role.rb
class Role < ActiveRecord::Base
serialize :permissions
has_many :users
end
- owner_only do
= link_to "My Control Panel", edit_bracket_path(@bracket), :title => 'Admin'