Skip to content

Instantly share code, notes, and snippets.

View pokutuna's full-sized avatar
👁️
👄👁👂

pokutuna pokutuna

👁️
👄👁👂
View GitHub Profile
@pokutuna
pokutuna / .gitignore
Last active March 21, 2017 00:54
DBD::mysql 4.042
local.*/
cpanfile.*.snapshot
@pokutuna
pokutuna / no_future.pl
Last active January 6, 2017 03:42
😢 Text::Xslate::Util::hash_with_default
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Section::Simple;
use Text::Xslate::Util;
use Text::Xslate;
my $vpath = Data::Section::Simple->new()->get_data_section();
my $vars = { foo => 'hoge', bar => 'fuga' };
@pokutuna
pokutuna / app.psgi
Last active November 24, 2016 05:05
nginx proxy_set_header
use strict;
use warnings;
my $app = sub {
my ($env) = @_;
return [ 200, [ 'Content-Type' => 'text/plain' ], [ "HTTP_HOST: $env->{HTTP_HOST}" ] ];
};
#!/bin/bash
# 思考停止で gzip にしつつ mysqldump でテーブルをバックアップしたりレストアしたりするぞ
if [ $# != 2 ]; then
echo 'tablebackup.sh backup TABLE'
echo 'tablebackup.sh restore DUMP.sql'
exit 1;
fi
@pokutuna
pokutuna / autoexec.cfg
Last active March 29, 2016 09:46
csgo
cl_interp "0"
cl_interp_ratio "1"
rate "128000"
cl_cmdrate "128"
cl_updaterate "128"
cl_lagcompensation "1"
cl_interpolate "1"
cl_disablefreezecam "1"
snd_mixahead "0.05"
fps_max "0"

日本海に行きたい

  • 日程: 5/5-6 1泊2日
  • 目的:
    • 日本海を見る
    • 海っぽいものを食べる

ルート

package main
import (
"fmt"
"time"
)
func intervalIterator(from, to time.Time, interval time.Duration) struct {
hasNext func() bool
get func() time.Time
package main
import (
"fmt"
"image"
"image/color"
"image/png"
"io/ioutil"
"os"
)
W/SignalStrength( 957): SignalStrength after validate=SignalStrength: 19 0 -120 -160 -120 -1 -1 99 2147483647 2147483647 2147483647 2147483647 cdma
D/FastDormancyService( 957): Find DataConnection
D/StatusBar.NetworkController( 861): onServiceStateChanged state=0 home NTT DOCOMO NTT DOCOMO 44010 UMTS:3 CSS not supported -1 -1 mDataState=0 RoamInd=-1 DefRoamInd=-1 EmergOnly=false RegistrationState=1
D/StatusBar.NetworkController( 861): Combining data service state0for signal
D/StatusBar.NetworkController( 861): refreshViews connected={ data } level=4 combinedSignalIconId=0x7f0200c9/com.android.systemui:drawable/stat_sys_signal_4_fully combinedActivityIconId=0x0 mAirplaneMode=false mDataActivity=0 mPhoneSignalIconId=0x7f0200c9 mDataDirectionIconId=0x7f0200a7 mDataSignalIconId=0x7f0200c9 mDataTypeIconId=0x7f0200a0 mNoSimIconId=0x0 mWifiIconId=0x0 mBluetoothTetherIconId=0x1080546
D/DMC_SERVICE( 3679): DmcTimeChangeAndPhoneStatusReceiver:onReceive
I/DMC_GLOBAL( 3679): boot_completed = 1
D/DMC_SERVICE( 3679):
# -*- coding: utf-8 -*-
class Util
def self.deg2rad(degree)
degree * Math::PI / 180.0
end
# ヒュベニの距離計算式 単位: m
def self.geo_distance(geo_a, geo_b)