Skip to content

Instantly share code, notes, and snippets.

@saviour123
saviour123 / ssl.sh
Last active April 29, 2024 13:26
check ssl on a website
#!/bin/bash
##
# Script which let's you gather some basic information about your SSL certificate
##
## Instructions
## wget https://gist.github.com/saviour123/cfb52d09883649296ed664e7f61e2ceb
## bash ssl domain.com
##

Nginx FastCGI cache

Example /etc/nginx/nginx.conf using FastCGI (e.g. to PHP-FPM) with FastCGI cache enabled. This will capture returned data and persist it to a disk based cache store for a configurable amount of time, great for robust full page caching.

Will need to create a directory to hold cache files, for the example given here that would be:

$ sudo mkdir -p /var/cache/nginxfastcgi
$ chown www-data: /var/cache/nginxfastcgi
@dixson3
dixson3 / workspace.sh
Created January 10, 2014 19:11
Create and manage a case-sensitive disk-image on OSX. This is great when you have a need to work with case-sensitive repos on a mac.
#!/bin/bash
# where to store the sparse-image
WORKSPACE=~/Documents/workspace.dmg.sparseimage
create() {
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE}
}
detach() {
@h4cc
h4cc / satis_github_auth.sh
Created November 27, 2013 17:50
Some notes on how to authenticate with composer/satis against github oauth, so the rate limit of 60 will be raised op to 5000. Can also be used for travis-ci.
# Create a new Token
curl -u 'githubuser' -d '{"note":"Your Application"}' https://api.github.com/authorizations
# It is: "ebab4dc37e654bb230a9c69ebcd5f38e9a81e210"
#{
# "created_at": "2013-01-04T18:00:28Z",
# "app": {
# "url": "http://developer.github.com/v3/oauth/#oauth-authorizations-api",
@daFish
daFish / ScriptHandler.php
Created November 13, 2012 13:00
Run 'bower install' with composer
namespace Fmdb\CoreBundle\Composer;
use Sensio\Bundle\DistributionBundle\Composer\ScriptHandler as BaseScriptHandler;
use Symfony\Component\ClassLoader\ClassCollectionLoader;
use Symfony\Component\Process\Process;
class ScriptHandler extends BaseScriptHandler
{
public static function installBowerAssets($event)
{
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: