Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
Si vous venez d'installer Codeigniter vous devriez voir par défaut "index.php" dans vos URLs. Vous pourriez vouloir le retirer. Voici la meilleure façon :
1. Ouvrez le fichier .system/application/config/config.php et modifier la variable $config['index_page'] afin qu'elle soit vide comme suit : $config['index_page'] = '';
Une seconde variable est a modifier :
$config['uri_protocol'] = "AUTO";
vers
$config['uri_protocol'] = "REQUEST_URI";
2. Créez un fichier .htaccess que vous placerez à la racine de votre projet Codeigniter :
@niceboy120
niceboy120 / gist:4667420
Created January 29, 2013 20:23
list modules apache with php
<?php
if( ! function_exists('apache_get_modules') ){ phpinfo(); die; }
$result = ' not available';
if(in_array('mod_rewrite',apache_get_modules())) $result = '
available';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
#!/bin/sh
SHORTCUT="[Desktop Entry]
Name=Sublime Text 2
Comment=Edit text files
Exec=/usr/local/sublime-text-2/sublime_text
Icon=/usr/local/sublime-text-2/Icon/128x128/sublime_text.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;TextEditor;"
@niceboy120
niceboy120 / Fedora Post Installer
Last active December 13, 2015 19:58
Fedora Post Installer
#! /bin/bash
# This software installation script is for Fedora 18
# You just need to hash out or remove any installation you don't want
# You can also add in additional software packages you like
#Updates
yum update -y yum
yum update -y
#Additional yum plugins and yum-utils
mkdir -p your_directory/{public,private,log,cgi-bin,backup}
#!/usr/bin/perl
use strict;
use warnings;
#
## Calomel.org ,:, Download Youtube videos and music using wget
## Script Name : youtube_get_video.pl
## Version : 0.30
## Valid from : December 2012
@niceboy120
niceboy120 / youtube.py
Created February 18, 2013 14:05 — forked from minrk/youtube.py
from IPython.core.display import display
class YouTubeVideo(object):
"""Class for embedding a YouTube Video in an IPython session, based on its video id.
e.g. to embed the video on this page:
http://www.youtube.com/watch?v=foo
you would do:
#!/usr/bin/perl -w
# Copyright © 2007-2013 Jamie Zawinski <jwz@jwz.org>
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation. No representations are made about the suitability of this
# software for any purpose. It is provided "as is" without express or
# implied warranty.
#!/bin/bash
#############
# FUNCTIONS
#############
function h1 {
echo
echo "###################"
echo "## $1"