Skip to content

Instantly share code, notes, and snippets.

View jgermade's full-sized avatar
🎨
Working from home

Jesús Germade jgermade

🎨
Working from home
View GitHub Profile
@joshmvandercom
joshmvandercom / .htaccess
Created January 19, 2012 15:57
.htaccess redirect w/ hash
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} !ajax
RewriteRule ^(.*)$ /#/$1 [R=301,L,NE]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
@oodavid
oodavid / README.md
Created March 26, 2012 17:05
Backup MySQL to Amazon S3

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc

@jessedearing
jessedearing / gist:2351836
Created April 10, 2012 14:44 — forked from twoism-dev/gist:1183437
Create self-signed SSL certificate for Nginx
#!/bin/bash
echo "Generating an SSL private key to sign your certificate..."
openssl genrsa -des3 -out myssl.key 1024
echo "Generating a Certificate Signing Request..."
openssl req -new -key myssl.key -out myssl.csr
echo "Removing passphrase from key (for nginx)..."
cp myssl.key myssl.key.org
openssl rsa -in myssl.key.org -out myssl.key
@desandro
desandro / bower-logo.md
Last active December 30, 2021 23:11
Bower logo

In addition to awesome docs #228, Bower deserves a proper logo. See below for sketches. I'm curious if you think any of these are worth me putting more effort into.


Take a look at Yeoman right now.

Screen Shot 2013-02-19 at 4 43 10 PM

The other two entities have awesome logos. Bower's got to represent.

@jimothyGator
jimothyGator / README.md
Last active December 20, 2024 09:08
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@aaronpk
aaronpk / Makefile
Last active December 20, 2015 10:39
me:
ifeq ($(USER), root)
@echo "\c"
else
@echo "make \c"
endif
a:
ifeq ($(USER), root)
@echo "\c"
@bonesoul
bonesoul / backup-db-to-git.sh
Last active March 24, 2022 15:56
MySQL Database to Git Backup Script
#!/bin/sh
cd /var/www/YOURSITE.ORG
date=`date +"%b-%d-%y-%H-%M-%S"`
mysqldump -h SERVER_IP -u root -pPASSWORD --skip-extended-insert --skip-dump-date --databases DBNAME > db-backups/YOURSITE.ORG.sql
git add -A
git commit -m "Site backups for $date"
git push
git gc
@cedricziel
cedricziel / dnsmasq.conf
Created October 24, 2013 12:23
Wildcard vhosts with nginx on a dev machine 1. Place wildcard.conf in /etc/nginx/sites-enabled or symlink it here 2. Place typo3 in /etc/nginx 3. Adjust the paths. I prefer to hold anything inside ~/public_html (needs adjustments. wire up www-data [or your systems flavor of that) and your current user group. Also let your php-fpm pool use your u…
address=/t3cmsdev/127.0.0.1
address=/l/127.0.0.1
address=/silex/127.0.0.1
address=/symfony2/127.0.0.1
address=/dev/127.0.0.1
@Stanback
Stanback / nginx.conf
Last active March 30, 2025 03:57 — forked from michiel/cors-nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@larryli
larryli / cgi.go
Last active March 5, 2024 17:14
golang net/http/cgi example
// go build -ldflags "-s -w" -o index.cgi cgi.go
package main
import (
"fmt"
"net/http"
"net/http/cgi"
)