Skip to content

Instantly share code, notes, and snippets.

View bellflower2015's full-sized avatar

Kikyou Akino bellflower2015

View GitHub Profile
@bellflower2015
bellflower2015 / sakura-setup.bash
Last active June 18, 2021 11:36
install script ( GNU Core Utilities, Git, Vim 7.4 + Lua, Tig, tmux ) for 'さくらのレンタルサーバ スタンダード'
#!/usr/local/bin/bash
#======================================
# sakura-setup.bash
#
# Date: 2015-09-07
# Author: Kikyou Akino <[email protected]>
#======================================
export LD_LIBRARY_PATH=$HOME/local/lib:/usr/local/lib:/usr/lib:$LD_LIBRARY_PATH
@bellflower2015
bellflower2015 / index.html
Created June 23, 2015 11:41
smartphone global menu which using SELECT tag
<!DOCTYPE html>
<html>
<head>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" />
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<nav class="menu">
@bellflower2015
bellflower2015 / chrome_bug_fix.js
Last active August 29, 2015 14:24
chrome bug fix for tyranoscript
// chrome_bug_fix.js
tyrano.plugin.kag.layer.forelay = function(layer) {
layer = layer || "";
for (key in this.map_layer_back)
if (layer == "" || layer == key) {
var fore_class_name = this.map_layer_fore[key].attr("class");
var back_class_name = this.map_layer_back[key].attr("class");
this.map_layer_fore[key] = this.map_layer_back[key].clone(true);
this.map_layer_fore[key].removeClass(back_class_name);
@bellflower2015
bellflower2015 / patch-Makefile-2
Created October 12, 2015 18:55
FreeBSD ports patch for git 2.6.1
--- Makefile.orig2 2015-10-13 03:41:46.000000000 +0900
+++ Makefile 2015-10-13 03:42:27.000000000 +0900
@@ -1068,15 +1068,15 @@ else
PROGRAM_OBJS += http-push.o
endif
endif
- curl_check := $(shell (echo 072200; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
- ifeq "$(curl_check)" "072200"
- USE_CURL_FOR_IMAP_SEND = YesPlease
- endif
@bellflower2015
bellflower2015 / mayoi.php
Last active December 18, 2015 07:17
マヨイドーロ問題 解答 (初期リビジョン=提出時のコード) - https://codeiq.jp/q/2549
<?php
$N = fgets(STDIN);
if ($N <= 0) $P = 0;
else {
$P = $p = 2;
$n = intval( ($N-1) / 2 );
for ($i = 1, $x = 1; $i <= $n; $i++) {
$x = bcadd($x, $p);
$p = bcadd($x, $p);
$P = bcadd($P, $p);
#bintray-tatsushid-h2o-rpm - packages by tatsushid from Bintray
[bintray-tatsushid-h2o-rpm]
name=bintray-tatsushid-h2o-rpm
#If your system is CentOS
baseurl=https://dl.bintray.com/tatsushid/h2o-rpm/centos/$releasever/$basearch/
#If your system is Fedora
#baseurl=https://dl.bintray.com/tatsushid/h2o-rpm/fedora/$releasever/$basearch/
gpgcheck=0
repo_gpgcheck=0
enabled=1
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
@bellflower2015
bellflower2015 / pspkg.bash
Created October 30, 2017 09:13
さくらのレンタルサーバ (FreeBSD-9.1-RELEASE) にて、ユーザー権限で ports を利用できるようにする
#!/usr/bin/env bash
PSPKGDIR=${PSPKGDIR:-$HOME/.pspkg}
PSPKGRC=$HOME/.pspkgrc
[ ! -e $PSPKGRC ] && cat << 'EOD' > $PSPKGRC
export PREFIX=$PSPKGDIR
export INSTALL_AS_USER=yes
#export DEPENDS_TARGET='package'
export LOCALBASE=$PREFIX
@bellflower2015
bellflower2015 / minecraft_sound_extractor.php
Last active March 19, 2018 20:38
Minecraft Sound Extractor for PHP
<?php
// $ curl -fsSL https://gist.github.com/bellflower2015/b989bc79ba0174f8d493dc6d5f0603c9/raw/minecraft_sound_extractor.php | php
$version = '1.12';
$outputDir = 'minecraft_sounds_' . preg_replace('/[^A-Za-z0-9]/', '_', $version);
@mkdir($outputDir, 0755, true);
$outputDir = realpath($outputDir);
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1