Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| #!/bin/sh | |
| # | |
| # redis - this script starts and stops the redis-server daemon | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Redis is a persistent key-value database | |
| # processname: redis-server | |
| # config: /etc/redis/redis.conf | |
| # config: /etc/sysconfig/redis | |
| # pidfile: /var/run/redis.pid |
| sub, sup { | |
| /* Specified in % so that the sup/sup is the | |
| right size relative to the surrounding text */ | |
| font-size: 75%; | |
| /* Zero out the line-height so that it doesn't | |
| interfere with the positioning that follows */ | |
| line-height: 0; | |
| /* Where the magic happens: makes all browsers position |
| <?php | |
| $regions = array( | |
| 'Africa' => DateTimeZone::AFRICA, | |
| 'America' => DateTimeZone::AMERICA, | |
| 'Antarctica' => DateTimeZone::ANTARCTICA, | |
| 'Aisa' => DateTimeZone::ASIA, | |
| 'Atlantic' => DateTimeZone::ATLANTIC, | |
| 'Europe' => DateTimeZone::EUROPE, | |
| 'Indian' => DateTimeZone::INDIAN, | |
| 'Pacific' => DateTimeZone::PACIFIC |
| #!/bin/sh | |
| export PATH=/bin:/usr/bin:/sbin:/usr/sbin | |
| usage=$( | |
| cat <<EOF | |
| $0 [OPTIONS] start/stop | |
| -s set speed default 256Kbit/s | |
| -p set port default 3000 | |
| -d set delay default 350ms |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Responsive Design Testing</title> | |
| <style> | |
| body { margin: 20px; font-family: sans-serif; overflow-x: scroll; } | |
| .wrapper { width: 6000px; } | |
| .frame { float: left; } | |
| h2 { margin: 0 0 5px 0; } |
| <?php # -*- coding: utf-8 -*- | |
| declare( encoding = 'UTF-8' ); | |
| /** | |
| * Plugin Name: Basic Meta Box | |
| * Description: Create a simple meta box. Demo plugin. | |
| * Version: 2012.02.05 | |
| * Required: 3.3 | |
| * Author: Fuxia Scholz | |
| * Author URI: https://fuxia.me | |
| * License: GPL |
| (function() { | |
| var script, | |
| scripts = document.getElementsByTagName('script')[0]; | |
| function load(url) { | |
| script = document.createElement('script'); | |
| script.async = true; | |
| script.src = url; | |
| scripts.parentNode.insertBefore(script, scripts); |
| // Linear Congruential Generator | |
| // Variant of a Lehman Generator | |
| var lcg = (function() { | |
| // Set to values from http://en.wikipedia.org/wiki/Numerical_Recipes | |
| // m is basically chosen to be large (as it is the max period) | |
| // and for its relationships to a and c | |
| var m = 4294967296, | |
| // a - 1 should be divisible by m's prime factors | |
| a = 1664525, | |
| // c and m should be co-prime |