Skip to content

Instantly share code, notes, and snippets.

View skynet's full-sized avatar

Ionel Roiban skynet

View GitHub Profile
@skynet
skynet / ocp.php
Created August 20, 2013 19:45 — forked from ck-on/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs
@skynet
skynet / plugin.php
Created December 7, 2013 20:08 — forked from joncave/plugin.php
<?php
/* Plugin Name: Damn Vulnerable WordPress Plugin
* Description: Intentionally vulnerable plugin for plugin author education
* Version: 0.1
* Plugin URI: http://make.wordpress.org/plugins/2013/04/09/intentionally-vulnerable-plugin/
* Author: Jon Cave
* Author URI: http://joncave.co.uk
* License: GPLv2+
*
* DO NOT RUN THIS PLUGIN ON AN INTERNET ACCESSIBLE SITE
#!/usr/bin/php
## If the credentials are wrong or missing:
#HTTP Status Code: 401{"errors":{"request":["Authorization Required"]}}
## If there is something wrong with the data being sent you might get an error like this
#HTTP Status Code: 400{"errors":{"request":["Failed to parse JSON body: can't convert String into Hash"]}}
## If it completed successfully you will only see the status code
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@skynet
skynet / gist:8797535
Created February 4, 2014 03:06
Ansible Playbook
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@skynet
skynet / gist:9401272
Created March 6, 2014 22:36
How to Set Default CSS Background Properties in WordPress Themes
/**
* http://wptavern.com/how-to-set-default-css-background-properties-in-wordpress-themes
*/
function yourtheme_setup() {
add_theme_support(
'custom-background',
array(
'default-color' => '2d2d2d',
'default-image' => get_template_directory_uri() . '/images/background.jpg',
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^widgets - [L]
RewriteRule ^index\.php$ - [L]
@skynet
skynet / gist.md
Created April 28, 2014 06:08 — forked from benbalter/gist.md

Here's an example of how to embed a Gist on GitHub Pages:

{% gist 5555251 %}

All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.