Skip to content

Instantly share code, notes, and snippets.

View UlasSAYGINIM's full-sized avatar

Ulaş SAYGIN UlasSAYGINIM

View GitHub Profile
@cosmomill
cosmomill / froxlor-php-fpm.patch
Created February 11, 2013 11:22
Add custom php.ini files for PHP-FPM to Froxlor 0.9.28-svn5
diff --git actions/admin/settings/136.phpfpm.php actions/admin/settings/136.phpfpm.php
index be0e925..07c73ce 100644
--- actions/admin/settings/136.phpfpm.php
+++ actions/admin/settings/136.phpfpm.php
@@ -54,20 +54,17 @@ return array(
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField'
),
- /*
- * @TODO implement if phpfpm knows custom php.ini files
@Rican7
Rican7 / url-rewriting.md
Created December 3, 2012 00:16
URL Rewriting

URL-rewriting for klein PHP router

Why rewrite URLs? Check Wikipedia

Apache

Make sure AllowOverride is on for your directory, or put in httpd.conf

# Apache (.htaccess or httpd.conf)

RewriteEngine On

@dmytro
dmytro / ssh-multi.sh
Created October 31, 2012 03:46
Start multiple synchronized SSH connections with Tmux
#!/bin/bash
# ssh-multi
# D.Kovalov
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html
# a script to ssh multiple servers over multiple tmux panes
starttmux() {
if [ -z "$HOSTS" ]; then
@glebm
glebm / bluepill
Created August 3, 2012 23:43 — forked from migrs/bluepill
bluepill init script
#!/bin/sh
### BEGIN INIT INFO
# Provides: bluepill
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: bluepill daemon, providing process monitoring
# Description: bluepill is a monitoring tool. More info at http://github.com/arya/bluepill.
@RaVbaker
RaVbaker / readme.md
Created March 30, 2012 20:12
[HOWTO] Rewrite all urls to one index.php in Apache

Redirect All Requests To Index.php Using .htaccess

In one of my pet projects, I redirect all requests to index.php, which then decides what to do with it:

Simple Example

This snippet in your .htaccess will ensure that all requests for files and folders that does not exists will be redirected to index.php:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d

@piti118
piti118 / gzstream.h
Created December 21, 2011 22:42
Header-only version of gzstream
// ============================================================================
// gzstream, C++ iostream classes wrapping the zlib compression library.
// Copyright (C) 2001 Deepak Bandyopadhyay, Lutz Kettner
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
@sobstel
sobstel / analyzer.rb
Created June 12, 2011 12:27
Apache log analyzer
#!/usr/bin/env ruby
# Apache log analyzer
# by Przemek Sobstel ([email protected])
require 'rubygems'
require 'slop'
require 'time'
class Array
@shanestillwell
shanestillwell / tuning-primer.sh
Created June 8, 2011 13:13
Mysql Tunning Primer script
#!/bin/sh
#########################################################################
# #
# MySQL performance tuning primer script #
# Writen by: Matthew Montgomery <[email protected]> #
# Inspired by: MySQLARd (http://gert.sos.be/demo/mysqlar/) #
# Version: 1.5-r2 Released: 2009-04-21 #
# Licenced under GPLv2 #
# #
@geoffgarside
geoffgarside / 503.mysql.sh
Created January 24, 2011 14:11
FreeBSD periodic/daily script for running MySQL backups
#! /bin/sh
#
# $FreeBSD$
#
# Maintenance shell script to backup mysql databases
# Put this in /usr/local/etc/periodic/daily, and it will be run
# every night
#
# By Geoff Garside <Geoff.Garside at m247.com>, Mon, Jan 24 13:04:18 GMT 2010
#
3.1.1 Mac OS X guests
Starting with version 3.2, VirtualBox has experimental support for Mac OS X guests.
This allows you to install and execute unmodified versions of OS X on supported host
hardware.
Whereas competing solutions perform modifications to the OS X install DVDs (e.g.
different boot loader and replaced files), VirtualBox is the first product to provide the
modern PC architecture expected by OS X without requiring any “hacks”.
You should be aware of a number of important issues before attempting to install
a Mac OS X guest:
1. OS X is commercial, licensed software and contains both license and technical