Skip to content

Instantly share code, notes, and snippets.

View eru's full-sized avatar
🍺
🍻

Kazuki Hashimoto eru

🍺
🍻
View GitHub Profile
diff '--color=auto' -bur PHPExcel-1.8.2/Classes/PHPExcel/Calculation/Engineering.php PHPExcel-1.8.2.new/Classes/PHPExcel/Calculation/Engineering.php
--- PHPExcel-1.8.2/Classes/PHPExcel/Calculation/Engineering.php 2018-11-23 08:07:24.000000000 +0900
+++ PHPExcel-1.8.2.new/Classes/PHPExcel/Calculation/Engineering.php 2023-06-03 17:17:14.864356436 +0900
@@ -768,7 +768,7 @@
// Split the input into its Real and Imaginary components
$leadingSign = 0;
if (strlen($workString) > 0) {
- $leadingSign = (($workString{0} == '+') || ($workString{0} == '-')) ? 1 : 0;
+ $leadingSign = (($workString[0] == '+') || ($workString[0] == '-')) ? 1 : 0;
}
#! /bin/sh
#
# clear-kernel-cache.sh
# Copyright (C) 2016 Kazuki Hashimoto <eru.tndl@gmail.com>
#
# Distributed under terms of the MIT license.
#
sudo rm -r /System/Library/Caches/com.apple.kext.caches
sudo touch /System/Library/Extensions
snippet abs
abbr number 絶対値
options word
abs($${1:number})${0}
snippet acos
abbr float 逆余弦(アークコサイン)
options word
acos($${1:arg})${0}
--- metro.css.orig 2016-10-13 20:35:32.000000000 +0900
+++ metro.css 2016-10-13 20:47:58.000000000 +0900
@@ -197,22 +197,22 @@
.view_history td:first-child{max-height:calc(100% - 1.1em);}
/* レス */
-.view_bookmark td:nth-child(2),
+.view_bookmark td:nth-child(3),
.view_board td:nth-child(3){margin-top:3px;}
.view_search td:nth-child(4){width:50%;margin-bottom:-1.3em;}
example.com
example.org
#! /bin/sh
#
# check-mx-record.sh
# Copyright (C) 2016 Kazuki Hashimoto <eru.tndl@gmail.com>
#
# Distributed under terms of the MIT license.
#
# e.g.
# ./check-mx-record.sh ns DOMAIN_LIST
# DOMAIN_LIST sample file: https://gist.github.com/b5a86150f98b3d6102d5608878ca53f0
<?php
/**
* Short description for relative_time.php
*
* @package relative_time
* @author Kazuki Hashimoto <eru.tndl@gmail.com>
* @version 0.1
* @copyright (C) 2016 Kazuki Hashimoto <eru.tndl@gmail.com>
* @license MIT
*/
<playercorefactory>
<players>
<player name="VLC" type="ExternalPlayer" audio="true" video="true">
<filename>/Applications/VLC.app/Contents/MacOS/VLC</filename>
<args>--rate 2.0 --video-on-top --play-and-exit</args>
<hidexbmc>true</hidexbmc>
</player>
</players>
<rules action="prepend">
<rule name="VLC" video="true" player="VLC">
diff --git linux/control.c linux/control.c
index 79716bd..2815f4f 100644
--- linux/control.c
+++ linux/control.c
@@ -208,9 +208,11 @@ SetupProcDevice(void)
VMBlockSetProcEntryOwner(controlProcMountpoint);
/* Create /proc/fs/vmblock/dev */
- controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME,
- VMBLOCK_CONTROL_MODE,
#!/bin/sh
# set PKGCMD
PKGCMD="yum"
if type dnf >/dev/null 2>&1; then
PKGCMD="dnf"
fi
# check root user
if [ ${EUID:-${UID}} != 0 ]; then