Skip to content

Instantly share code, notes, and snippets.

Patrick LaRoche PLaRoche

Block or report user

Report or block PLaRoche

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
@PLaRoche
PLaRoche / post-receive
Last active Jan 19, 2016
git post receive hook for a laravel app
View post-receive
#!/usr/bin/env ruby
# post-receive
#From: http://krisjordan.com/essays/setting-up-push-to-deploy-with-git
# NOTE: if you have a sudo requires tty you have to change the require tty line in your sudeors file
# Make sure you can write to the dir:
`sudo chown -R ec2-user:ec2-user /var/app/current`
@PLaRoche
PLaRoche / howto_laravel_gitVersion_footer_codeship.md
Created Feb 17, 2016
codeship git versions in footer (laravel)
View howto_laravel_gitVersion_footer_codeship.md
@PLaRoche
PLaRoche / git_push.sh
Created Jun 1, 2016
git shell push script
View git_push.sh
#!/bin/bash
# Deploy to via pushing to a remote git repository.
#
# Add the following environment variables to your project configuration and make
# sure the public SSH key from your projects General settings page is allowed to
# push to the remote repository as well.
# * REMOTE_REPOSITORY, e.g. "git@github.com:codeship/documentation.git"
# * REMOTE_BRANCH, e.g. "production"
#
#
@PLaRoche
PLaRoche / post-receive-hook.sh
Created Jun 1, 2016
new laravel post receive hook with gulp, etc in it
View post-receive-hook.sh
#!/bin/sh
# from - See more at:
# http://www.codyjbutz.com/blog/deploying-laravel-5-using-git-hooks#sthash.6YmBWVjW.dpuf
WEBDIRECTORY=/var/www/simplecourt.com
GITDIRECTORY=/home/deployer/repos/simplecourt.git
USER=deployer
GROUP=www-data
#set HOME so that git uses the correct ~/.git/ folder
@PLaRoche
PLaRoche / manifold.php
Last active Dec 13, 2017
Manifold.php for JawsDB Mysql
View manifold.php
<?php
return [
'token' => env('MANIFOLD_API_TOKEN', null),
'resource_id' => env('MANIFOLD_RESOURCE_ID', null),
'project' => env('MANIFOLD_PROJECT', null),
'product' => env('MANIFOLD_PRODUCT', null),
'aliases' => [
'database' => [
'connections' => [
View kcdr.sh
# Add to your bashrc or equivalent
# kcdr will force reload a deployment by re-annotating the metadata with the
# current timestamp.
function kcdr {
kubectl patch deployment $@ -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"`date +'%s'`\"}}}}}"
}
View web-deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
io.kompose.service: web
randomlabel : website
name: web
spec:
replicas: 1
strategy: {}
View web-service.yaml
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
io.kompose.service: web
randomlabel : website
name: web
spec:
ports:
View send_sms_question.py
def send_sms_question(command, channel):
data = command.split(" ", 2) # maxsplit
question = pytill.make_question(data[2], channel, PUBLIC_ADDR + WEBHOOK_ADDR)
pytill.send_question([data[1]], [question], "{}-tag".format(data[2]))
response = "Question sent to {} listening for answers...".format(data[1])
return response
View send_sms.py
def send_sms(command):
data = command.split(" ", 2) # maxsplit
pytill.send_message([data[1]], data[2])
response = "Text sent to {}".format(data[1])
return response
You can’t perform that action at this time.