Skip to content

Instantly share code, notes, and snippets.

<?php
/*
HHVMinfo - phpinfo page for HHVM HipHop Virtual Machine
Author: _ck_
License: WTFPL, free for any kind of use or modification, I am not responsible for anything, please share your improvements
Version: 0.0.7
* revision history
0.0.7 2015-03-27 reformatted, fixed XSS issues
0.0.6 2014-08-02 display fix for empty vs zero
@ck-on
ck-on / patch-moon-color.php
Last active February 4, 2016 12:30
Patch Emoji-One Moon Color to Silver instead of Yellow
<?php
/*
Patches Emoji-One svg moon shapes to use silver color instead of bright yellow.
Free for any kind of use, distribution or modification, no attribution required.
Possible to use same technique to create Unicode 8.0 diversity skin colors.
Re-render png from svg via: inkscape -z -w 64 -h 64 -f infile.svg -e outfile.png
version 0.0.5
*/
$path=dirname ( __FILE__ ).DIRECTORY_SEPARATOR; // edit path if running outside SVG directory
@ck-on
ck-on / service
Last active February 4, 2016 12:31
script to enhance SERVICE command in CentOS 7 and avoid systemctl annoyances
#!/bin/bash
#
# script to enhance service command in CentOS 7 and avoid systemctl annoyances
# save to: /usr/local/bin/service then: chmod +x /usr/local/bin/service last: hash -d service
# this is a very unpolished work in progress, wtfpl free for any kind of use
#
service="/usr/sbin/service"
systemctl="/usr/bin/systemctl"
journalctl="/usr/bin/journalctl"
function linebreak { echo '------------------------------'; }
@tomolimo
tomolimo / ocp.php
Last active May 30, 2016 08:35 — forked from ck-on/ocp.php
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?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
@ck-on
ck-on / analyze-ip-relationships.php
Created September 16, 2013 12:53
Analyze a large list of IPs for potential relationships (eventually group IPs into CIDR ranges) Useful to help decode a botnet attacking servers.
<?php
$file='ip-list.txt';
$closeness=32768; // 65536 131072;
$minrelated=4;
$sorted=array();
$ips=file($file);
echo '<pre style="white-space:pre-wrap;">',count($ips)," IPs <br>\r\n"; flush();
@GeoffWilliams
GeoffWilliams / squid.conf
Last active November 11, 2018 18:14
squid config file for openwrt. Cache large binary files ONLY and enable intercept proxy
#
# Recommended minimum configuration:
#
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network

The issue:

..mobile browsers will wait approximately 300ms from the time that you tap the button to fire the click event. The reason for this is that the browser is waiting to see if you are actually performing a double tap.

(from a new defunct https://developers.google.com/mobile/articles/fast_buttons article)

touch-action CSS property can be used to disable this behaviour.

touch-action: manipulation The user agent may consider touches that begin on the element only for the purposes of scrolling and continuous zooming. Any additional behaviors supported by auto are out of scope for this specification.

@Zitrax
Zitrax / cronlist.sh
Created October 2, 2012 14:17 — forked from nitehawk/cronlist.sh
Script to list all cron events on a system - found on stackoverflow.com: http://bit.ly/nkFwD9 Modified from original to pick up users also in /home.
#!/bin/bash
# System-wide crontab file and cron job directory. Change these for your system.
CRONTAB='/etc/crontab'
CRONDIR='/etc/cron.d'
# Single tab character. Annoyingly necessary.
tab=$(echo -en "\t")
# Given a stream of crontab lines, exclude non-cron job lines, replace
@ck-on
ck-on / hhvminfo.php
Last active September 18, 2022 05:44
HHVMinfo - phpinfo for HHVM HipHop Virtual Machine
<?php
/*
HHVMinfo - phpinfo page for HHVM HipHop Virtual Machine
Author: _ck_
License: WTFPL, free for any kind of use or modification, I am not responsible for anything, please share your improvements
Version: 0.0.6
* revision history
0.0.6 2014-08-02 display fix for empty vs zero
0.0.5 2014-07-31 try to determine config file from process command line (may not always work), style improvements
@kfox
kfox / sysctl.conf
Created February 29, 2012 17:32
Linux kernel tuning settings for large number of concurrent clients
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0