Skip to content

Instantly share code, notes, and snippets.

@roytam1
roytam1 / git-cvsmod2subdir.sh
Created October 17, 2021 03:04
git-cvsmod2subdir.sh mod
#!/bin/sh
###########################################################
# Script to import several CVS modules as subdirectories
# into a git repository. If necessary create the repository
# with git init, and perform a an initial commit committing
# something before running this script. git seems reluctant
# to merge into a completely empty repository.
#
# Thanks to all the people who have placed useful git
--- screen-v.4.6.2/src/screen.c.orig 2017-10-23 20:18:26.000000000 +0800
+++ screen-v.4.6.2/src/screen.c 2018-09-21 20:36:34.581125000 +0800
@@ -1106,12 +1106,14 @@
Panic(0, "'%s' must be a directory.", SockDir);
if (eff_uid == 0 && real_uid && (int)st.st_uid != eff_uid)
Panic(0, "Directory '%s' must be owned by root.", SockDir);
n = (eff_uid == 0 && (real_uid || (st.st_mode & 0775) != 0775)) ? 0755 :
(eff_gid == (int)st.st_gid && eff_gid != real_gid) ? 0775 : 0777;
+#if !defined(__CYGWIN__)
if (((int)st.st_mode & 0777) != n)
diff --git a/cjpeg.c b/cjpeg.c
index 07e7db1..76aba95 100644
--- a/cjpeg.c
+++ b/cjpeg.c
@@ -6,6 +6,8 @@
* Modified 2003-2011 by Guido Vollbeding.
* libjpeg-turbo Modifications:
* Copyright (C) 2010, 2013-2014, 2017, D. R. Commander.
+ * mozjpeg Modifications:
+ * Copyright (C) 2014, Mozilla Corporation.
<?php
class _prepend_cf_ips {
var $cf_ipv4;
var $cf_ipv6;
function _IPv4_CIDRmatch($addr,$cidr) {
list($ip, $mask) = explode('/', $cidr);
return (ip2long($addr) >> (32 - $mask) == ip2long($ip.str_repeat('.0', 3 - substr_count($ip, '.'))) >> (32 - $mask));
}
javascript:void%20function(){function%20t(t){var%20e=/[^%3C%3E]\b(%3F:https%3F|ftp):\/\/[a-z0-9-+%26%40%23\/%25%3F=~_|!:,.;]*[a-z0-9-+%26%40%23\/%25=~_|](%3F![^%3C%3E])/gim;return%20t.replace(e,'%3Ca%20href=%22$%26%22%3E$%26%3C/a%3E')}function%20e(a){a||(a=document.body);for(var%20n=a.childNodes,o=0;o%3Cn.length;o++)3==n[o].nodeType||(%22textarea%22==(x=n[o].tagName.toLowerCase())||%22input%22==x%26%26%22text%22==n[o].getAttribute(%22type%22)%3Fn[o].value=t(n[o].value):e(n[o]))}function%20a(t){try{e(t.document.body);for(var%20n=0;n%3Ct.frames.length;n++)a(t.frames[n])}catch(o){}}a(window)}();
@roytam1
roytam1 / big5-replace-bookmarklet.txt
Created December 15, 2016 06:56
big5-replace bookmarklet
javascript:void%20function(){function%20u(e,C,t){t||(t=document.body);for(var%20a=t.childNodes,o=new%20RegExp(e,%22gi%22),n=0;n%3Ca.length;n++)3==a[n].nodeType%3Fa[n].nodeValue=a[n].nodeValue.replace(o,C):%22textarea%22==(x=a[n].tagName.toLowerCase())||%22input%22==x%26%26%22text%22==a[n].getAttribute(%22type%22)%3Fa[n].value=a[n].value.replace(o,C):u(e,C,a[n])}function%20e(t){try{for(var%20a=0;a%3CC.length;a++)u(C[a][0],C[a][1],t.document.body);for(var%20o=0;o%3Ct.frames.length;o++)e(t.frames[o])}catch(n){}}var%20C=[[%22%5Cu7DAB%22,%22%5Cu7DDA%22],[%22%5Cu7D89%22,%22%5Cu7E61%22],[%22%5Cu92B9%22,%22%5Cu93FD%22],[%22%5Cu6ED9%22,%22%5Cu532F%22],[%22%5Cu6822%22,%22%5Cu67CF%22],[%22%5Cu5CEF%22,%22%5Cu5CF0%22],[%22%5Cu9834%22,%22%5Cu7A4E%22],[%22%5Cu90A8%22,%22%5Cu6751%22],[%22%5Cu7740%22,%22%5Cu8457%22],[%22%5Cu53CC%22,%22%5Cu96D9%22],[%22%5Cu5553%22,%22%5Cu555F%22]];e(window)}();
@roytam1
roytam1 / ecms-tc-to-sc-supplement-bookmarklet.txt
Last active December 15, 2016 07:06
ecms-tc-to-sc-supplement
javascript:void%20function(){function%20C(u,e,F){F||(F=document.body);for(var%20n=F.childNodes,o=0;o%3Cn.length;o++)if(3==n[o].nodeType){var%20E=new%20RegExp(u,%22gi%22);n[o].nodeValue=n[o].nodeValue.replace(E,e)}else%20C(u,e,n[o])}for(var%20u=[[%22%5Cu65BC%22,%22%5Cu4E8E%22],[%22%5Cu5F8C%22,%22%5Cu540E%22],[%22%5Cu7BC4%22,%22%5Cu8303%22],[%22%5Cu5925%22,%22%5Cu4F19%22],[%22%5Cu4E7E%22,%22%5Cu5E72%22],[%22%5Cu9EBD%22,%22%5Cu4E48%22],[%22%5Cu81FA%22,%22%5Cu53F0%22],[%22%5Cu83F8%22,%22%5Cu70DF%22],[%22%5Cu9592%22,%22%5Cu95F2%22],[%22%5Cu50AD%22,%22%5Cu4F63%22],[%22%5Cu5FB5%22,%22%5Cu5F81%22],[%22%5Cu6A38%22,%22%5Cu6734%22],[%22%5Cu8768%22,%22%5Cu8671%22],[%22%5Cu9336%22,%22%5Cu8868%22],[%22%5Cu8814%22,%22%5Cu869D%22],[%22%5Cu7662%22,%22%5Cu75D2%22],[%22%5Cu7665%22,%22%5Cu75C7%22],[%22%5Cu7051%22,%22%5Cu6D12%22],[%22%5Cu9451%22,%22%5Cu9274%22],[%22%5Cu965C%22,%22%5Cu9655%22],[%22%5Cu859F%22,%22%5Cu83B6%22],[%22%5Cu92B9%22,%22%5Cu9508%22],[%22%5Cu58BB%22,%22%5Cu5899%22],[%22%5Cu7CA7%22,%22%5Cu5986%22],[%22%5Cu5AF
@roytam1
roytam1 / big5-missing-in-adobe-japan1-3.txt
Created September 3, 2014 00:27
List(map) of missing Big5-available glyphs in Adobe-Japan1-3
Area 1
刁丫么孓丰仃內勻戶卡叼叵另叻奶扔扒扑氐甩丟乒乓乩仿伙伕仳份伋划刖吆吒囝圳圬圯圩她朵氖汙污汛汍佔佣你佈
刨吞吧呃吳吵吱囪囤囫坍圾妒妞尬彤忪扭扳扯抆杗步每沉沅汴汶沔沘灶牠盯迆邢阱阬佬佾佺兕剁劻卹咖呸咕咚呢垃
坷坼妮姍姊妯妳姒姅帘帕怔怵戕戾拄抿拋抨拚拖拎枓歧沬泜泖泠炕爸狀玨玟玫玥甽疙矽秈羋肫芣芰芾芷邶俏俞侷兗
剎哎咦咪咱咻咧咿垮姘姣峒帟弈彥徉挖拼拽拴查枰柙柒毗氟洱泵洹洧洮洎炤牯玷甭畎疤疢盅盹盼砍祆竽籽紉紇羿耍
耑舢苯虺觔趴迤迨郃倌值倀俱倘剜厝唁唷哼唉哪唧埂堉娛娓姬娣娌屘崁峴捎捂捆挪敉晌晅桌桅栘氧氨氦涉涊浥涔烊
烘烤爹玆盎眨砰砸砝砷砭砟胰胭胳臬舀舨荔荃蚜衹訕訏訑軔邕郝釙陡陘偺偌偎偷偯偭匾啪啦啡啃啊啕啤唬啁埤夠婊
屜屝崆崤巢庾徜恿您惋惦悻捱掄掙啟敔旎晚梆梡梂氫涮淚淄涪涿焊烯猓猙琊琍產盔眾眶硃笮紼絀紱缽翎脖脫脰脤莘
荸莒莆莧蛀蚵蚱訢豉逛酗釩陴雩傢傖喂喔喳喲喻喱堠婷媧崴嵇廄愜愣愒揍揭揪摒揹晾晷棵棻氮氯氬湔渲渴溉湣湄湩
犄琯琛琨痠睏稅絕絰腌菸菔虛蛐詖跎跑跆鄉郾鈣鈉鈇閎隄雯韌飧飪黃傻傯僇剷嗨嗓嗦嗎嗑嗯嗡嗆嗥嗉塌塭媳媲弒徬
@roytam1
roytam1 / 聲優廚IP.txt
Last active January 14, 2021 07:28
聲優廚IP.txt
1.168.105.216 2015-05-16 21:04:15 (fx12)
1.170.88.4 04/14 19:58:04
1.170.88.68 04/08 20:10:29
1.170.88.138 04/06 21:06:36
1-170-88-146.dynamic.hinet.net 06/24 17:04
1.170.88.187 04/14 21:37:01
1.170.89.5 04/08 20:59:03
1-170-89-23.dynamic.hinet.net 07/18 12:35
1.170.89.70 04/10 23:52:36