Skip to content

Instantly share code, notes, and snippets.

View panakuma's full-sized avatar
💤
睡眠中

panakuma panakuma

💤
睡眠中
View GitHub Profile
int RED = 11;
int GREEN = 12;
int BLUE = 13;
int SPEAKER = 8;
int japa[] = {698,659,698,784,698,784,880,932,988,1046,880,794,698,698,1175,1046,698,587,932,880,784,698};
int japa_notes_time[] = {1,1,1,2,1,1,2,1,1,3,1,1,1,2,2,2,2,2,2,2,2,4};
int koi[] = {1109, 1318, 1109, 1318, 1480, 1318, 1109, 880, 988, 1109, 1109, 1318, 1109, 1760, 1661, 1480, 1318, 1480, 1318, 880, 988};
<?php
function IsbnConsistencyCheck($isbn){
$isbn_arr = str_split($isbn);
$odd = 0;
$mod = 0;
for($i=0;$i<(count($isbn_arr)-1);$i++){
if($i % 2 == 0) $mod += (int)$isbn_arr[$i];
else $odd += (int)$isbn_arr[$i];
}
<?php
echo("郵便番号をハイフン無しで入力して下さい: ");
$zipcode = trim(fgets(STDIN));
try{
if(preg_match('|^[0-9]{7}|', $zipcode)){ //入力データの簡易バリデータ(数字7桁)
$apiURL = "http://zipcloud.ibsnet.co.jp/api/search?zipcode=$zipcode";
$data = json_decode(file_get_contents($apiURL));
# 本体設定
console lines infinity
console prompt [端末名(地名が好ましい)]
login timer 900
# 基本的なルーティング設定
ip route default gateway [上位ルータのIPアドレス]
ipv6 routing on
ipv6 route default gateway dhcp lan2
Get-AppxPackage Microsoft.Xbox.TCUI | remove-AppxPackage #Xbox TCUI
Get-AppxPackage Microsoft.XboxGameOverlay | remove-AppxPackage #Xbox
Get-AppxPackage Microsoft.XboxGamingOverlay | remove-AppxPackage #Xbox
Get-AppxPackage Microsoft.XboxSpeechToTextOverlay | remove-AppxPackage #Xbox
Get-AppxPackage Microsoft.XboxIdentityProvider | remove-AppxPackage #Xbox
Get-AppxPackage Microsoft.XboxApp | remove-AppxPackage #Xbox
Get-AppxPackage Microsoft.MixedReality.Portal | remove-AppxPackage #VR上でWebブラウザや写真鑑賞ができる
Get-AppxPackage Microsoft.Microsoft3DViewer | remove-AppxPackage #Mixed Reality ビューアー
Get-AppxPackage Microsoft.Messaging | remove-AppxPackage #Messaging
Get-AppxPackage Microsoft.WindowsCamera | remove-AppxPackage #WindowsCamera
@panakuma
panakuma / VyOSとRTX1200でIPSec over IPv6 (Vyos側がレスポンダ)
Last active March 25, 2019 19:44
VyOSとRTX1200でIPSec over IPv6 (Vyos側がレスポンダ)
tunnel select 100
description tunnel myskng
ipsec tunnel 100
ipsec sa policy 100 100 esp aes-cbc sha-hmac
ipsec ike version 100 2
ipsec ike always-on 100 on
ipsec ike encryption 100 3des-cbc
ipsec ike hash 100 sha
ipsec ike group 100 modp1024
ipsec ike keepalive log 100 off
@panakuma
panakuma / DnsResolver.ps1
Created February 9, 2019 19:04
PowerShellで名前解決して返すやつ
function Dns-Resolver([String]$domain, [int]$type) {
Add-Type -AssemblyName System.Net
[array]$HostEntries = [System.Net.DNS]::GetHostEntry($domain)
switch($type){
4 {
[array]$IPaddresses = $HostEntries.AddressList | ?{$_.AddressFamily -eq "InterNetwork"}
}
6 {
[array]$IPaddresses = $HostEntries.AddressList | ?{$_.AddressFamily -eq "InterNetworkV6"}
@panakuma
panakuma / RTXとNEC IXでNGN網折り返しIPSec IX側
Last active November 2, 2023 13:38
RTXとNEC IXでNGN網折り返しIPSec構築 (RTXはVPNに必要な部分だけ)
! NEC Portable Internetwork Core Operating System Software
! IX Series IX2105 (magellan-sec) Software, Version 10.1.14, RELEASE SOFTWARE
! Compiled Mar 06-Wed-2019 14:03:05 JST #2
! Current time Mar 26-Tue-2019 04:29:21 JST
!
timezone +09 00
!
logging buffered 204800
!
ntp server 133.243.238.163
@panakuma
panakuma / fonts.conf
Created June 20, 2019 01:41
源ノ角ゴシックと源ノ角明朝と源ノ角ゴシック Code JPをよしなに使うfonts.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Default serif fonts -->
<match target="pattern">
<test qual="any" name="family"><string>sans</string></test>
<edit name="family" mode="prepend" binding="same"><string>源ノ角ゴシックJP</string></edit>
</match>
<match target="pattern">