Skip to content

Instantly share code, notes, and snippets.

@icai
icai / jquery-autoresize.js
Created June 11, 2012 09:08
jQuery autoResize (textarea auto-resizer)
/*
* jQuery autoResize (textarea auto-resizer)
* @copyright James Padolsey http://james.padolsey.com
* @version 1.04
*
* cracked by icyleaf <icyleaf.cn@gmail.com>
* Search and Find the keyword '[NEW ADDED]' for details.
*/
(function($){
@icai
icai / LICENSE.txt
Created June 20, 2013 15:43 — forked from jed/LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@icai
icai / 0_reuse_code.js
Last active August 29, 2015 14:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@icai
icai / PHP:is_crawler
Created July 5, 2019 02:40 — forked from zhangguiqiang/PHP:is_crawler
PHP:is_crawler(判断是否是爬虫)
function isCrawler() {
if(ini_get('browscap')) {
$browser= get_browser(NULL, true);
if($browser['crawler']) {
return true;
}
} else if (isset($_SERVER['HTTP_USER_AGENT'])){
$agent= $_SERVER['HTTP_USER_AGENT'];
$crawlers= array(
"/Googlebot/",
@icai
icai / cloudflare-ddns-update.sh
Created January 5, 2024 12:18 — forked from Tras2/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record