Skip to content

Instantly share code, notes, and snippets.

View q0rban's full-sized avatar
👋

James Sansbury q0rban

👋
View GitHub Profile
@q0rban
q0rban / 00-tugboat-private-gitlab-howto.md
Last active September 20, 2022 14:39
How to add a self-hosted GitLab repo to Tugboat.qa

How to add a self-hosted GitLab repo to Tugboat

By default, Tugboat's GitLab integration uses OAuth to connect to GitLab Cloud. To add a repository to Tugboat that is hosted on a private or self-hosted GitLab instance, you'll need to use the Tugboat API.

Prerequisites

  1. You must have administrator permissions on GitLab for the repo you would like to add to Tugboat.
  2. You must already have an account on Tugboat and have created a Tugboat project. More on this below.
  3. You must be an Admin or Owner on Tugboat for the aforementioned project in #2.
@q0rban
q0rban / pipedrive.js
Created March 19, 2020 18:24
PipeDrive Fluid App Userscript
// PipeDrive Fluid App Activity Dock Badge.
// Authored by @q0rban
// 1. Set Patterns to *pipedrive.com*.
// 2. Paste this script.
// 3. Refresh your Fluid App.
// 4. If you still don't see badges, you might have to edit ~/Library/com.apple.ncprefs.plist
// and set flags for the app to "41,951,254". Then log out and log back in.
window.fluid.dockBadge = '';
// Set the dock badge after one second.
@q0rban
q0rban / config.yml
Last active February 19, 2020 19:25
Script to periodically create a new Tugboat Base Preview and an example circle
# An example CircleCI config.yml to periodically build a new Tugboat base preview.
version: 2
jobs:
rebuild-tugboat:
docker:
- image: circleci/node:10-stretch
steps:
- run:
name: Install Tugboat
command: |
@q0rban
q0rban / Makefile.d7
Last active March 27, 2018 13:36
Example Tugboat Makefiles
packages:
apt-get update
apt-get install -y mysql-client rsync
curl -L "https://github.com/drush-ops/drush/releases/download/8.1.15/drush.phar" > /usr/local/bin/drush
chmod +x /usr/local/bin/drush
drupalconfig:
cp /var/www/html/sites/default/tugboat.settings.php /var/www/html/sites/default/settings.local.php
createdb:
#!/bin/bash
####
# Split MySQL dump SQL file into one file per table
# based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump
####
if [ $# -lt 1 ] ; then
echo "USAGE $0 DUMP_FILE [TABLE]"
exit
--- uat.txt 2016-04-12 17:27:28.000000000 -0400
+++ prod.txt 2016-04-12 17:26:35.000000000 -0400
@@ -19,7 +19,7 @@
[instance] => Array
(
[label] => Title
- [description] =>
+ [description] =>
[required] => 1
[settings] => Array
--- uat.txt 2016-04-12 16:28:41.000000000 -0400
+++ prod.txt 2016-04-12 16:28:59.000000000 -0400
@@ -1,24 +1,21 @@
- This node
+This node
Keyword: %node
%node:flag-cisco-add-to-calendar-count --> Add event to my calendar flag count
%node:flag-cisco-add-to-calendar-link --> Add event to my calendar flag link
-%node:field_address --> Address
%node:field-address --> Address
@q0rban
q0rban / -
Created April 12, 2016 20:29
--- uat.txt 2016-04-12 16:28:41.000000000 -0400
+++ prod.txt 2016-04-12 16:28:59.000000000 -0400
@@ -1,24 +1,21 @@
- This node
+This node
Keyword: %node
%node:flag-cisco-add-to-calendar-count --> Add event to my calendar flag count
%node:flag-cisco-add-to-calendar-link --> Add event to my calendar flag link
-%node:field_address --> Address
%node:field-address --> Address
@q0rban
q0rban / Makefile
Last active March 7, 2016 14:24
Example Project Makefile and shell scripts for use with Tugboat.
#
# Makefile for Project Foo
#
# Includes commands for Tugboat. Feel free to expand with custom project
# commands.
#
# This is called during "tugboat init", after all of the service containers have
# been built, and the git repo has been cloned. This can be used for things like
# installing additional libraries that don't come built-in to the tugboat
@q0rban
q0rban / INSTALL.md
Last active August 29, 2015 14:25
git-drush

Installation Instructions

First, copy the link to the raw git-drush.sh file.

# Download the file
$ wget [link-to-raw-git-drush.sh-file]

# Move it to a directory where you store binaries, such as ~/bin or /usr/local/bin:
$ mv git-drush.sh /usr/local/bin/git-drush