package App::Const;
use Const::Common( HOGE => 10, );
1;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"os" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"runtime" | |
"sync" | |
) | |
func goroutineId() string { | |
buf := make([]byte, 1024) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use 5.018; | |
use strict; | |
use warnings; | |
use utf8; | |
use Furl; | |
sub zoi_urls { | |
state $urls = do { | |
my $furl = Furl->new; | |
my @urls = (); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 "$@" |
例えばこういうのがあって
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;
$ 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}"
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" vim:set ts=8 sts=2 sw=2 tw=0: (この行に関しては:help modelineを参照) | |
" | |
" An example for a Japanese version vimrc file. | |
" 日本語版のデフォルト設定ファイル(vimrc) - Vim7用試作 | |
" | |
" Last Change: 24-Jul-2007. | |
" Maintainer: MURAOKA Taro <koron@tka.att.ne.jp> | |
" | |
" 解説: | |
" このファイルにはVimの起動時に必ず設定される、編集時の挙動に関する設定が書 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my ($first, @cmd); | |
while ( <> ) { | |
if ( /^([a-zA-Z0-9\-]+)/ ) { | |
$first = $1; | |
} elsif ( /^\s*(:[a-zA-Z0-9\-]+)/ ) { |