Skip to content

Instantly share code, notes, and snippets.

View fetus-hina's full-sized avatar
💭
I may be slow to respond.

AIZAWA Hina fetus-hina

💭
I may be slow to respond.
View GitHub Profile
@fetus-hina
fetus-hina / named.conf
Last active August 29, 2015 14:01
2ch.netの名前解決ができないのでgoogleさんに解決してもらう
zone "2ch.net" { type forward; forward only; forwarders { 8.8.8.8; 8.8.4.4; }; };
zone "bbspink.com" { type forward; forward only; forwarders { 8.8.8.8; 8.8.4.4; }; };
zone "maido3.com" { type forward; forward only; forwarders { 8.8.8.8; 8.8.4.4; }; };
zone "nttec.com" { type forward; forward only; forwarders { 8.8.8.8; 8.8.4.4; }; };
zone "pinktower.com" { type forward; forward only; forwarders { 8.8.8.8; 8.8.4.4; }; };
zone "tora3.net" { type forward; forward only; forwarders { 8.8.8.8; 8.8.4.4; }; };
@fetus-hina
fetus-hina / mysqldump_order.php
Created May 21, 2014 14:03
mysqldumpで外部キーの依存がなんとかなるようにdump順を並び替えるための殴り書きスクリプト。並び替え部分がかなりひどい。
<?php
$host = 'localhost';
$port = 3306;
$user = 'DBUSER';
$pass = 'DBPASS';
$database = 'DBNAME';
// Autoloader http://www.revulo.com/blog/20090524.html
require_once('Zend/Loader/Autoloader.php');
$autoloader = Zend_Loader_Autoloader::getInstance()
@fetus-hina
fetus-hina / ks.cfg
Created July 12, 2014 11:38
さくらVPSにCentOS 7をISO+kickstartでインストールしたのでメモ
install
cdrom
text
unsupported_hardware
lang en_US --addsupport=ja_JP
keyboard jp106
skipx
selinux --disabled
firewall --enabled --ssh
firstboot --disabled
@fetus-hina
fetus-hina / gist:3941974886668df89e7c
Last active August 29, 2015 14:04
OL7 php install
# yum install php
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.4.16-21.el7 will be installed
--> Processing Dependency: php-cli(x86-64) = 5.4.16-21.el7 for package: php-5.4.16-21.el7.x86_64
--> Processing Dependency: httpd-mmn = 20120211-x86-64 for package: php-5.4.16-21.el7.x86_64
--> Processing Dependency: php-common(x86-64) = 5.4.16-21.el7 for package: php-5.4.16-21.el7.x86_64
--> Running transaction check
---> Package php.x86_64 0:5.4.16-21.el7 will be installed
@fetus-hina
fetus-hina / jquery.reveach.js
Created December 10, 2014 07:55
$('.hoge').each() の逆順
(function($){
"use strict";
$.fn.revEach = function(callback, args) {
var $this = $(this.get().reverse());
$.each($this, callback, args);
};
})(jQuery);
@fetus-hina
fetus-hina / _chomado_bot.md
Last active August 29, 2015 14:14
ちょまどっぽいど

ちょまどっぽいど (@_chomado_bot)

ちょまどさんのツイートを学習して喋ります。

一部変な機能があります。

フォロー返しについて

<?php
class MillerRabinTest {
public static function isPrime($number, $round = 10) {
$number = intval($number);
$round = intval($round);
if($number === 2) {
return true;
}
if($number === 1 || $number % 2 === 0) {
return false;
@fetus-hina
fetus-hina / mfg.log.txt
Created March 12, 2015 16:53
myfleetgirls
3 13, 2015 1:51:29 午前 com.ponkotuy.util.Log$class error
ERROR: -1
scala.collection.LinearSeqOptimized$class.apply(LinearSeqOptimized.scala:65)
scala.collection.immutable.List.apply(List.scala:84)
com.ponkotuy.parser.DependentPost$$anonfun$mapRoute$1.apply(DependentPost.scala:127)
com.ponkotuy.parser.DependentPost$$anonfun$mapRoute$1.apply(DependentPost.scala:126)
scala.Option.foreach(Option.scala:257)
com.ponkotuy.parser.DependentPost.mapRoute(DependentPost.scala:126)
com.ponkotuy.parser.ResponseController$$anonfun$query$18.apply(ResponseController.scala:73)
com.ponkotuy.parser.ResponseController$$anonfun$query$18.apply(ResponseController.scala:73)
@fetus-hina
fetus-hina / gist:8a7b531aefe2c515d139
Created April 27, 2015 09:22
HHVM date.timezone UTC
# タイムゾーンはデフォルト (America/New_York のはず)
[fetus@harusame bin]$ /opt/hhvm/hhvm-3.6.1/bin/hhvm hoge.php
2015-04-27 05:16:51-0400
# Asia/Tokyo を指定してみる
[fetus@harusame bin]$ /opt/hhvm/hhvm-3.6.1/bin/hhvm -d date.timezone=Asia/Tokyo hoge.php
2015-04-27 18:16:59+0900
# Etc/UTC を指定してみる
[fetus@harusame bin]$ /opt/hhvm/hhvm-3.6.1/bin/hhvm -d date.timezone=Etc/UTC hoge.php
@fetus-hina
fetus-hina / reply.xml
Created May 12, 2015 08:09
ちょまどっぽいどのリプライ用辞書
<?xml version="1.0" encoding="UTF-8"?>
<dictionary>
<match>
<type>reply</type>
</match>
<set>
<match>
<keyword>ホモ</keyword>
</match>
<text>{shindanmaker:a315883}</text>