Skip to content

Instantly share code, notes, and snippets.

View JimmyRittenborg's full-sized avatar

Jimmy Rittenborg JimmyRittenborg

View GitHub Profile
@bjeanes
bjeanes / README.markdown
Created September 4, 2008 03:39
A completely up-to-date Cap2 deployment recipe for Media Temple Grid Server + Git

Media Temple Capistrano Deployment Recipe

With GitHub

See comments in the files for explanation. This works flawlessly for me on MediaTemple + Git(Hub).

To use:

On the Server

  1. SSH into your MediaTemple server.
  2. Put your public key into ~/.ssh/authorized_keys2 with mode 0600
#!/usr/bin/perl -w
use strict;
use DBI;
use Net::FTP;
use Switch;
use POSIX qw(strftime);
use Text::Wrap;
$Text::Wrap::columns = 120;
our %remote_login; #ftp or scp log in information
our $remote_type; #is it ftp or scp?
<?php
s::start();
function panelUser() {
$cookie = cookie::get('auth');
if(!$cookie) return false;
$info = s::get($cookie);
@JonasDoebertin
JonasDoebertin / readme.md
Last active December 30, 2015 19:29
XML Sitemap for Kirby CMS

sitemap.xml for Kirby CMS

Notes:

  • Remember to exclude the sitemap from caching, search and the sitemap itself!
@waja
waja / check_ocsp_class1_startssl
Created January 6, 2014 12:26
Check the status of the ocsp responder (here the class1 startssl variant). The -header option (supported by recent openssl versions) is needed for fixing HTTP/1.1, see http://www.math.ucla.edu/~jimc/documents/bugfix/21-openssl-ocsp.html!
#!/bin/sh
wget -q http://www.startssl.com/certs/sub.class1.server.ca.pem -O /tmp/sub.class1.server.ca.pem; \
openssl ocsp -CAfile /tmp/sub.class1.server.ca.pem -issuer /tmp/sub.class1.server.ca.pem \
-url http://ocsp.startssl.com/sub/class1/server/ca -noverify -no_nonce \
-header "HOST" "ocsp.startssl.com" -cert ${1}
@ryansechrest
ryansechrest / post-receive.sh
Last active February 12, 2017 12:41
Git post-receive hook to deploy WordPress and plugins as submodules. It can also install Node.js modules with npm and vendor packages with Composer.
#!/bin/bash
# Created on 7/17/13 by Ryan Sechrest
# Deploys pushed branch from the origin repository to the web directory
if [[ (-n $1) && (-n $2) && (-n $3) ]]; then
# Set path to project directory
project_path="/var/www/domains/$2/$3"
@ramv
ramv / kirby.conf
Created March 6, 2014 23:49
Kirby NGINX configuration
##############################
## Kirby configuration
##############################
location /kirby/ {
include /etc/nginx/mime.types;
index index.php;
root /var/www/addons88/;
if (!-e $request_filename){
@igrigorik
igrigorik / gist:3148848
Created July 20, 2012 05:24
Convert any YouTube video into an audio file you can listen to on the go...
# Convert any YouTube video into an audio file you can listen to on the go, using:
# http://rg3.github.com/youtube-dl/
{ ~ } > brew install ffmpeg
{ ~ } > wget https://raw.github.com/rg3/youtube-dl/2012.02.27/youtube-dl
{ ~ } > chmod u+x youtube-dl
# Pick which video format you want to download.. (use any YT video link)
{ ~ } > ./youtube-dl -s -F http://www.youtube.com/watch?v=vT1KmTQ-1Os
@dkubb
dkubb / ssl.nginxconf
Last active April 11, 2019 03:56
Nginx SSL configuration (PFS, HSTS, SPDY, BREACH mitigation, FIPS compliant)
ssl_certificate cert.pem;
ssl_certificate_key cert.key.pem;
ssl_trusted_certificate cert.ca.pem;
ssl_dhparam cert.dh.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers FIPS@STRENGTH:!aNULL:!eNULL;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
@ryansechrest
ryansechrest / bash-commands.sh
Last active April 20, 2020 18:15
New and enhanced bash commands for developers on Mac OS X.
#!/bin/bash
# ---------------------------------------------------------------------------
#
# File: .bash_commands
#
# Author: Ryan Sechrest
# Website: ryansechrest.com
#
# Description: New and enhanced bash commands for developers on Mac OS X.