Skip to content

Instantly share code, notes, and snippets.

View kazz187's full-sized avatar
🍙
👮

Kazuki AKAMINE kazz187

🍙
👮
View GitHub Profile
package main
import (
"context"
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
"github.com/jmoiron/sqlx"
"log"
)
@kazz187
kazz187 / fc-mogra.json
Created December 18, 2016 05:22
fadecandy mogra config file.
{
"listen": [null, 7890],
"verbose": true,
"color": {
"gamma": 2.5,
"whitepoint": [1.0, 1.0, 1.0]
},
"devices": [
{
"stepSequencerList": [
{
"params": "{\"startX\": 30, \"rate\": 2, \"stripeIds\": [0]}",
"boolArray": [
true,
false,
false,
false,
false,
<?php
$str = "よのなかねかおかおかねかなのよ";
var_dump(kaibun_check($str));
function kaibun_check($str) {
$char_code = 'utf8';
$length = mb_strlen($str, $char_code);
for ($i = 0; $i < $length / 2; $i++) {
if (mb_substr($str, $i, 1, $char_code) !== mb_substr($str, $length - $i - 1, 1, $char_code)) {
return false;
#!/usr/bin/env ruby
def main
source = ARGV[0]
offset_time = ARGV[1].to_f
trim_time = ARGV[2].to_f
#size = '480x270'
size = ARGV[3]
crop = ''
crop = "-crop #{ARGV[4]}" unless ARGV[4].nil?
「〇〇様 IT専門ヘッドハンティング会社よりご相談 」
〇〇様
はじめまして。
株式会社エグゼクティブエージェントの〇〇と申します。
def self.get_user_icon_url(screen_name)
if screen_name.nil?
return nil
end
open_url = "https://twitter.com/#{screen_name}"
require 'open-uri'
begin
doc = open(open_url)
rescue
logger.debug "Can't open #{open_url}"
@kazz187
kazz187 / lovelive_set_list.diff
Created February 9, 2014 18:25
ラブライブ 4th 2 days のセットリスト差分
--- lovelive4th1 2014-02-10 03:20:15.000000000 +0900
+++ lovelive4th2 2014-02-10 03:20:45.000000000 +0900
@@ -1,48 +1,56 @@
Music S.T.A.R.T!!
僕らは今のなかで
MC
夏色えがお1,2,Jump!
Wonderful Rush
@kazz187
kazz187 / readline_hack.rb
Created December 5, 2013 20:23
readline supports startup_hook.
require 'readline'
require 'fiddle/import'
module Readline
module LIBREADLINE
extend Fiddle::Importer
# このパスどうしよ
dlload '/usr/local/opt/readline/lib/libreadline.6.2.dylib'
RL_STARTUP_HOOK = import_symbol 'rl_startup_hook'
end
% sbt compile [~/IdeaProjects/chronod]
[info] Loading project definition from /Users/kazz/IdeaProjects/chronod/project
[info] Updating {file:/Users/kazz/IdeaProjects/chronod/project/}chronod-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Set current project to chronod (in build file:/Users/kazz/IdeaProjects/chronod/)
[info] Compiling 1 Scala source to /Users/kazz/IdeaProjects/chronod/target/scala-2.10/classes...
[error] /Users/kazz/IdeaProjects/chronod/src/main/scala/net/animetick/chronod/service/ChronodDaemon.scala:8: not found: type Logging
[error] class ChronodDaemon extends Logging {
[error] ^