Skip to content

Instantly share code, notes, and snippets.

View subins2000's full-sized avatar
♥️
ആരാണു് സമാധാനം ആഗ്രഹിക്കാത്തതു്. Queen - 39

Subin Siby subins2000

♥️
ആരാണു് സമാധാനം ആഗ്രഹിക്കാത്തതു്. Queen - 39
View GitHub Profile
<?php
function random($occurence = 4, $range = 100){
return rand(1, $range) % $occurence === 0;
}
$count = 0;
for($i=1;$i < 100;$i++){
random($argv[1]) === true ? $count++ : 0;
}
var_dump($count);
?>
@subins2000
subins2000 / xml2-config
Created September 16, 2016 16:16
xml2-config BASH script
#! /bin/sh
prefix=/home/simsu/Other/projects/Web/Lobby/Zed/Auto/Android/compile/libxml2/output
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
usage()
{
cat <<EOF
@subins2000
subins2000 / dns.c
Created February 13, 2017 04:10
PHP dns.c for Android
/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
srcdir = /home/simsu/Other/projects/Web/Lobby/Zed/Auto/Android/Installer/compile/php/src
builddir = /home/simsu/Other/projects/Web/Lobby/Zed/Auto/Android/Installer/compile/php/src
top_srcdir = /home/simsu/Other/projects/Web/Lobby/Zed/Auto/Android/Installer/compile/php/src
top_builddir = /home/simsu/Other/projects/Web/Lobby/Zed/Auto/Android/Installer/compile/php/src
EGREP = /bin/grep -E
SED = /bin/sed
CONFIGURE_COMMAND = './configure' '--host=' '--with-pic' '--with-sqlite3' '--with-pdo-mysql' '--with-pdo-sqlite' '--with-curl=/home/simsu/Other/projects/Web/Lobby/Zed/Auto/Android/Installer/compile/curl/output' '--with-openssl=/home/simsu/Other/projects/Web/Lobby/Zed/Auto/Android/Installer/compile/openssl/output' '--with-mcrypt=/home/simsu/Other/projects/Web/Lobby/Zed/Auto/Android/Installer/compile/libmcrypt/output' '--with-libxml-dir=/home/simsu/Other/projects/Web/Lobby/Zed/Auto/Android/Installer/compile/libxml2/output' '--with-config-file-path=php.ini' '--with-config-file-scan-dir=.' '--enable-cli' '--enable-pd
@subins2000
subins2000 / console.js
Created June 19, 2017 08:34
WordPress newsletter Plugin : Resend Confirmation To All persons Shows In List
!function(c){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.onload=c,t.src="https://malsup.github.io/jquery.form.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}(function(){
jQuery("td:nth-child(1)").each(function(){
jQuery('form#channel').find('[name=btn]').val(jQuery(this).text().replace(/(\r\n|\n|\r)/gm,"").trim());
jQuery('form#channel').find('[name=act]').val('resend');
jQuery('form#channel').ajaxSubmit();
});
});
@subins2000
subins2000 / console.js
Created June 19, 2017 08:34
WordPress newsletter Plugin : Resend Confirmation To All persons Shows In List
/**
* Run this in browser console
*/
!function(c){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.onload=c,t.src="https://malsup.github.io/jquery.form.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}(function(){
jQuery("td:nth-child(1)").each(function(){
jQuery('form#channel').find('[name=btn]').val(jQuery(this).text().replace(/(\r\n|\n|\r)/gm,"").trim());
jQuery('form#channel').find('[name=act]').val('resend');
jQuery('form#channel').ajaxSubmit();
});
});
@subins2000
subins2000 / caesar-cipher.php
Created September 8, 2017 08:35
Caesar cipher
<?php
/**
* @author Subin Siby <subinsb.com>
*/
function getInput()
{
return trim(fgets(STDIN));
}
function encrypt($i, $k)
<?php
/**
* @author Subin Siby <subinsb.com>
*/
function getInput()
{
return trim(fgets(STDIN));
}
@subins2000
subins2000 / answers.md
Last active November 25, 2017 09:07
Module 6 Answers of ICP 2016 & 2017 Exam Papers