Skip to content

Instantly share code, notes, and snippets.

@jtperreault
jtperreault / gist:5161942
Last active May 9, 2019 16:01
This is the service script for Nginx installed to /opt/ by the Phusion Passenger gem. This script should reside in /etc/init.d/ and is invoked to manage the nginx process from the command line like so: $ service nginx restart
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@plasticbrain
plasticbrain / geoip-apache-module
Created November 8, 2013 20:54
Install MaxMind's GeoIP modules for Apache (on Ubuntu)
I. Prerequisites
$ apt-get install apache2-prefork-dev
$ apt-get install apache2-threaded-dev
$ apt-get install libgeoip-dev
1. Download and install mod_geoip2
http://www.maxmind.com/download/geoip/api/mod_geoip2/mod_geoip2-latest.tar.gz
@mlabouardy
mlabouardy / ami.json
Created November 4, 2018 09:46
Template file to bake Jenkins ami
{
"variables" : {
"region" : "eu-west-3",
"source_ami" : "ami-0ebc281c20e89ba4b"
},
"builders" : [
{
"type" : "amazon-ebs",
"profile" : "default",
"region" : "{{user `region`}}",
@zenideas
zenideas / existing code to git repo
Created October 1, 2012 09:52
Adding existing source to remote git repo
If you've got local source code you want to add to a new remote new git repository without 'cloning' the remote first, do the following (I often do this - you create your remote empty repository in bitbucket/github, then push up your source)
1. Create the remote repository, and get the URL such as git://github.com/youruser/somename.git
2. If your local GIT repo is already set up, skips steps 2 and 3
3. Locally, at the root directory of your source, git init
4. Locally, add and commit what you want in your initial repo (for everything,
git add .
<html prefix="og: http://ogp.me/ns#">
<head>
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="video.movie" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />
<meta property="al:ios:app_store_id" content="342792525" />
<meta property="al:ios:url" content="imdb://title/tt0117500" />
@mlabouardy
mlabouardy / setup.sh
Created November 4, 2018 09:45
provision jenkins instance
#!/bin/bash
echo "Install Jenkins stable release"
yum remove -y java
yum install -y java-1.8.0-openjdk
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
yum install -y jenkins
chkconfig jenkins on
@hroling
hroling / gist:85f36e86d48285f08161
Last active March 28, 2021 02:42
Apache 2.4 SSL config for A+ on SSLLabs.com
OLD stuff. This was not enough for an A+ anymore.
@Biker93
Biker93 / d7adp72.Dockerfile
Created May 16, 2019 17:51
Biker Drupal 7 Dockerfile
# docker build -t drupal:d7adp72 -f d7adp72.Dockerfile .
# docker image tag drupal:d7adp72 .../drupal:d7adp72
# docker push .../drupal:d7adp72
FROM php:7.2-apache
# install the PHP extensions we need
RUN set -ex; \
\
if command -v a2enmod; then \
@grahamb
grahamb / sfucanvas.md
Last active August 16, 2021 17:54
SFU's Canvas LMS infrastructure and ugprade

🎓 Canvas at SFU

Simon Fraser University is a mid-sized comprehensive university with three campuses in the Greater Vancouver area of British Columbia, Canada. We are a trimester school, with a Fall, Spring and Summer term. We have approximately 25,000 undergraduate FTEs.

SFU chose Canvas as its new LMS during a selection process in 2011/2012. We went into production in 2012. As of this writing, our enrollment counts in Canvas are:

  • Students: 25250
  • Teachers: 1070
  • TAs: 865
@guilouro
guilouro / clone_bitbucket_docker.txt
Last active November 9, 2021 16:22
Clone bitbucket private repo in Dockerfile
FROM ubuntu
MAINTAINER Guilherme Louro "guipclouro@gmail.com"
# Update aptitude with new repo
RUN apt-get update
# Install software
RUN apt-get install -y git
# Make ssh dir