Skip to content

Instantly share code, notes, and snippets.

View johnlawsharrison's full-sized avatar

John Harrison johnlawsharrison

View GitHub Profile
Date: Jan 1, 2020
Routes: Chain Reaction, Rude Boys, Heinous Cling
Workouts: Max Hangs, Boards
Effort: 10
Other Notes: I tried really hard today
Date: Jan 7, 2020
Routes: 9 Gallon Buckets
Workouts: Running
Effort: 4
@johnlawsharrison
johnlawsharrison / use-git-sparse-checkout-to-deploy-mono-repo.md
Last active July 14, 2020 03:45
Using the git sparse checkout command along with git hooks to deploy different subfolders in a mono-repo

Basic steps:

  • set up Travis deploy key for your deploy user
  • update .travis.yml with deploy stage to add this key to ssh-agent
  • create a bare repo on your deployment server to use as a remote
  • set up post-receive hook, using git sparse checkout to checkout subdirectories to different working trees
#!/bin/sh
git config --global core.sparsecheckout true
echo backend > /home/travis/playlist-deploy/.git/info/sparse-checkout
git --work-tree=/opt/playlist/ --git-dir=/home/travis/playlist-deploy/.git checkout -f
@johnlawsharrison
johnlawsharrison / auto-deploying.md
Created July 13, 2020 02:26 — forked from nickbclifford/auto-deploying.md
How to automatically deploy code to a server using Travis CI

Auto-Deploying via Travis CI

Because Travis CI can automatically execute scripts after successfully (or unsuccessfully!) executing tests, it is an obvious choice for a deployment tool. In order to deploy to a Git repository on a remote server, the process generally is as follows:

  • Set up SSH keys
  • Add the server's copy of the repository as a Git remote
  • Push to the remote
  • SSH into the server and execute any installation/compilation/miscellaneous commands

Before even touching .travis.yml...

Users

window.addEventListener("load", function() {
var Q = window.Q = Quintus({development: true})
.include("Scenes, Sprites, 2D, Input, Touch, UI, TMX, Audio")
.setup({
width: 320,
height: 180,
scaleToFit: true
}).controls().touch();
Q.setImageSmoothing(false);