Skip to content

Instantly share code, notes, and snippets.

mix3@サタデーナイトフィーバー mix3

Block or report user

Report or block mix3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View cpanfile
requires "SQL::Translator::Producer::PlantUML";
requires "DBD::mysql";
View main.go
package main
import (
"log"
"github.com/hashicorp/hcl"
"github.com/k0kubun/pp"
)
type Config struct {
@mix3
mix3 / search.pl
Created Sep 28, 2015
括弧の範囲を探すやーつ
View search.pl
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
my $depth = 0;
my $str = "";
while (<>) {
if (/sqlt_deploy_hook\s+\{/) {
View cloud-config.yml
#cloud-config
write_files:
- path: /var/lib/iptables/rules-save
permissions: 0644
owner: root:root
content: |
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
View L2TP_IPSec_vpn_setup_for_centos7.sh
#!/bin/bash -x
# Description:L2TP/IPsec for CentOS7 64bit
# 2015/05/09 @mix3
(
## setting
cat << _SECRETS_ > /tmp/SECRETS_TMP.txt
#==============================================
# username auth_server password auth_ipaddress
@mix3
mix3 / gist:27f0e7f593aacd9787e7
Last active Aug 29, 2015
Data::Dumperで出力したやつの文字列を無理やり変換する
View gist:27f0e7f593aacd9787e7
$ perl -MData::Dumper -e 'use utf8; local $Data::Dumper::Purity = 1; local $Data::Dumper::Terse = 1; local $Data::Dumper::Deepcopy = 1; local $Data::Dumper::Quotekeys = 0; local $Data::Dumper::Sortkeys = 1; print Dumper { "あ" => "い", "う" => "え" };'
{
  "\x{3042}" => "\x{3044}",
  "\x{3046}" => "\x{3048}"
}
View gist:075df9d988ce12fab143

例えばこういうのがあって

CREATE TABLE sample (
  id      BIGINT  unsigned NOT NULL auto_increment,
  type    TINYINT unsigned NOT NULL DEFAULT 0,
  body    TEXT             NOT NULL,
  is_read TINYINT unsigned NOT NULL DEFAULT 0,
  primary key (id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4;
View gist:50d0a4f703707728a391
#!/bin/bash
LIB_DIR=~/.plenv/libs
PERL_VERSION=`plenv version | awk -v ORS='' '{print $1}'`
SS_DIR=`ls -alh $LIB_DIR | grep $PERL_VERSION | grep start_server | awk '{print $NF}'`;
SS_LIB=$LIB_DIR/$SS_DIR
if [ -e $SS_LIB ]; then
eval $(perl -Mlocal::lib=$SS_LIB)
start_server "$@"
@mix3
mix3 / zoi_urls.pl
Created Jan 22, 2015
http://zoi.herokuapp.com/ から画像urlのリストを取ってくる
View zoi_urls.pl
use 5.018;
use strict;
use warnings;
use utf8;
use Furl;
sub zoi_urls {
state $urls = do {
my $furl = Furl->new;
my @urls = ();
@mix3
mix3 / runtime.stack.parse.go
Last active Aug 29, 2015
runtime.StackからgoroutineIDを取得する
View runtime.stack.parse.go
package main
import (
"log"
"runtime"
"sync"
)
func goroutineId() string {
buf := make([]byte, 1024)
You can’t perform that action at this time.