Skip to content

Instantly share code, notes, and snippets.

ck-on

Block or report user

Report or block ck-on

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ck-on
ck-on / patch-moon-color.php
Last active Feb 4, 2016
Patch Emoji-One Moon Color to Silver instead of Yellow
View patch-moon-color.php
<?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 Feb 4, 2016
script to enhance SERVICE command in CentOS 7 and avoid systemctl annoyances
View service
#!/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 '------------------------------'; }
@ck-on
ck-on / hhvminfo.php
Last active Mar 12, 2018
HHVMinfo - phpinfo for HHVM HipHop Virtual Machine
View hhvminfo.php
<?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
@ck-on
ck-on / analyze-ip-relationships.php
Created Sep 16, 2013
Analyze a large list of IPs for potential relationships (eventually group IPs into CIDR ranges) Useful to help decode a botnet attacking servers.
View analyze-ip-relationships.php
<?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();
@ck-on
ck-on / ocp.php
Last active Nov 3, 2019
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
View ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
You can’t perform that action at this time.