Skip to content

Instantly share code, notes, and snippets.

--- reblogcommand_add_privatemode_for_rev12526.user.js Sat Feb 21 19:36:23 2009
+++ reblogcommand_add_privatemode_for_rev12526_fix.user.js Sat Feb 21 19:41:21 2009
@@ -96,7 +96,7 @@
}
}
if(isPrivate){
- arr.push("post[is_private]=1");
+ arr.push("post[state]=private");
}
return arr.join('')
Sub [Call]()
' write code....
End Sub
@echo off
:: test of "sequence number file"
setlocal enabledelayedexpansion
set prefix=C:\path\to\hoge.
set extension=.bk
set pad=2
for /l %%i in (1, 1, 15) do (
set num=00000%%i
@lyo
lyo / install_memo.sh
Created October 7, 2010 15:49
FreeBSD+Root on ZFS環境構築メモ
#FreeBSD+Root on ZFS
#install memo
#ad0 と da0(USB)の表示確認
gpart show
#対象を絞って...
gpart show ad0
#前回分削除
gpart delete -i 1 ad0
@lyo
lyo / sshd_config.diff
Created October 9, 2010 07:10
sshd_condig変更
--- /etc/ssh/sshd_config.old 2010-10-09 16:03:06.146720701 +0900
+++ /etc/ssh/sshd_config 2010-10-09 16:09:31.423106107 +0900
@@ -42,7 +42,7 @@
# Authentication:
#LoginGraceTime 2m
-#PermitRootLogin no
+PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
@lyo
lyo / portsnap.conf.diff
Created October 9, 2010 07:53
portsnap.conf変更
--- portsnap.conf.orig 2010-10-09 16:51:22.408553978 +0900
+++ portsnap.conf 2010-10-09 16:52:33.721948279 +0900
@@ -26,8 +26,8 @@
# directives and experience problems, remove them and update your tree
# before asking for help on the mailing lists.
#
-# REFUSE arabic chinese french german hebrew hungarian japanese
-# REFUSE korean polish portuguese russian ukrainian vietnamese
+REFUSE arabic chinese french german hebrew hungarian
+REFUSE korean polish portuguese russian ukrainian vietnamese
@lyo
lyo / KERNEL_config.diff
Created October 9, 2010 10:09
ZFS用にカーネルアドレス空間サイズを変更
--- GENERIC 2010-06-14 11:09:06.000000000 +0900
+++ i386_ZFS_KERNEL 2010-10-09 19:08:07.568827820 +0900
@@ -21,7 +21,7 @@
cpu I486_CPU
cpu I586_CPU
cpu I686_CPU
-ident GENERIC
+ident i386_ZFS_KERNEL
# To statically compile in device wiring instead of /boot/device.hints
@lyo
lyo / Makefile.PL
Created November 12, 2012 15:34
PerlMagick Build.PL_customize
# Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization
# dedicated to making software imaging solutions freely available.
#
# You may not use this file except in compliance with the License. You may
# obtain a copy of the License at
#
# http://www.imagemagick.org/script/license.php
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# somewhat hackish solution to:
# https://twitter.com/EamonCaddigan/status/646759751242620928
# based mostly on copy/pasting from ggplot2 geom_violin source:
# https://github.com/hadley/ggplot2/blob/master/R/geom-violin.r
library(ggplot2)
library(dplyr)
"%||%" <- function(a, b) {
# to see
# https://www.pediatricsurgery.site/entry/2018/03/04/133703
# https://mrunadon.github.io/ggplot2/
# https://sugioka.wiki.fc2.com/wiki/ggplot2でviolinplotを描く
ggplot()+theme_set(theme_bw(base_size = 14))
mean_fun <- function(x){
return(data.frame(y = min(x)+0.5, label = paste0(round(mean(x),1))))
}