Skip to content

Instantly share code, notes, and snippets.

View drlinux's full-sized avatar
🤘
I may be slow to respond.

Ibrahim YILMAZ drlinux

🤘
I may be slow to respond.
View GitHub Profile
@drzax
drzax / headjsgmaps.html
Created February 5, 2011 04:23
A head.js/Google Maps test case
<!DOCTYPE html>
<html>
<head>
<title>head.js / Google Maps test case</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="https://github.com/headjs/headjs/raw/master/dist/head.load.min.js"></script>
<script>head.js('http://code.jquery.com/jquery-1.5.min.js',"http://maps.google.com/maps/api/js?sensor=false&callback=init_map");</script>
<script>
@dch
dch / rr_db.erl
Created January 10, 2012 15:07 — forked from evanmiller/rr_db.erl
code from @evanmiller for couchdb with chicago boss (Chicagosaurus Rex)
-module(rr_db, [Server, PhotoRoot]).
-define(MIME_TYPE, "application/json").
-compile(export_all).
init() ->
inets:start(),
inets:start(httpc, [{profile, database}]).
reset() ->
@jjulian
jjulian / apache.conf
Created February 23, 2012 03:38
Apache rewrite rules to show a maintenance page
# Capistrano-style: if maintenance.html exists, it will be served for any request
# other than style and images. Use status code 503 to tell crawlers to come back later.
ErrorDocument 503 /system/maintenance.html
RewriteEngine On
RewriteCond %{REQUEST_URI} !\.(css|gif|jpg|png)$
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ - [redirect=503,last]
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@jsifalda
jsifalda / php.ini
Created August 18, 2012 10:32
Xdebug: nginx (php-fpm) and phpStorm configuration
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
[xdebug]
xdebug.idekey="macgdbp"
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9089
xdebug.remote_handler="dbgp"
@llacroix
llacroix / xmms2.rb
Created September 23, 2012 16:36
Brew xmms2 formula
require 'formula'
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class Xmms2 < Formula
homepage 'http://xmms2.org/wiki/Main_Page'
url 'http://git.xmms2.org/xmms2/xmms2-devel/snapshot/6e6a9635f04c3e2c7af8dd9336ca6006d89f8114.tar.gz'
sha1 'b8ade9e2c511280fe98ed81df438e357b22f8157'
version '0.8.1'
@radiosilence
radiosilence / gist:3946121
Created October 24, 2012 13:43
Outputs some files that WMs can import and colourify everything with.
import sys
import colorsys
from colorz import colorz
WALLPAPER = '/home/james/.wallpaper'
COLORS = '/home/james/.colors'
XRESOURCES = '/home/james/.Xresources'
cols = ''
xres = """
#!/bin/sh -x
cd /tmp
if [ ! -d "geocouch" ]; then
git clone https://github.com/couchbase/geocouch.git
fi
cd geocouch
git checkout couchdb1.2.x
@glueckpress
glueckpress / remove-file-versions-from-scripts.php
Last active December 16, 2015 10:39
[WordPress] Removes version queries from script/stylesheet calls in WordPress, but keeps query of google font stylesheets.
<?php
/**
* Removes file version queries from script/stylesheet calls.
* http://wordpress.stackexchange.com/a/96325/23011
*
* Enhanced to keep query of google font stylesheets:
* Removes “?ver=3.5.1” from http://domain.tld/wp-content/themes/theme/stlye.css?ver=3.5.1
* Leaves http://fonts.googleapis.com/css?family=MyFont untouched.
*/
add_filter( 'script_loader_src', 'gp130419_remove_script_version', 15, 1 );
@creack
creack / prestashop.sh
Created June 19, 2013 21:51
prestasthop orchestration for docker
#!/bin/sh
# Set conveniance variables0
PS_PATH=/var/www/prestashop
PS_SETTINGS_FILE=$PS_PATH/config/settings.inc.php
PS_SETTINGS_TEMPLATE=$PS_PATH/config/settings.inc.php.template
# Build the base PrestaShop image from the Dockerfile
IMAGE_ID=$(cat Dockerfile | docker build - | tail -1)