Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

set nocompatible
syntax on
filetype plugin indent on
" encoding
set encoding=utf-8
set termencoding=utf-8
set fileencoding=utf-8
set fileencodings=utf-8,euc-jp,sjis,iso-2022-jp,cp932
escape 
defkanji utf-8
defencoding utf-8
encoding utf-8 utf-8
startup_message off
autodetach on
vbell off
defscrollback 5000
{
use Catalyst::Utils ();
no warnings 'redefine';
sub Catalyst::Utils::class2prefix {
my $class = shift || '';
my $case = shift || 0;
my $prefix;
if ( $class =~ /^.+?::([MVC]|Model|View|Controller)::(.+)$/ ) {
$prefix = $case ? $2 : do {
$prefix = $2;
{
use CSS::Tiny::Style ();
no warnings 'redefine';
sub CSS::Tiny::Style::_sel_arr {
local $_ = shift;
my @d;
while ($_) {
my ($tag, $op);
(function(){
var url=location.href;
var r=url.match(/http:\/\/[\w]+\.youtube\.com\/watch\?v=([\w-]+)/i);
var flv=RegExp.$1;
var d=document;
var f=d.createElement('form');
f.action='http://mixi.jp/add_diary.pl?id=374297';
f.method='post';
f.target=flv;
f.innerHTML='<input type=\'hidden\' name=\'diary_body\' value=\'<externalvideo src=%22YT:'+flv+':D%22>\'/>';
# This is CPAN.pm's systemwide configuration file. This file provides
# defaults for users, and the values can be changed in a per-user
# configuration file. The user-config file is being looked for as
# ~/.cpan/CPAN/MyConfig.pm.
$CPAN::Config = {
'auto_commit' => q[0],
'build_cache' => q[10],
'build_dir' => q[/root/.cpan/build],
'cache_metadata' => q[1],
autoload -U compinit
compinit
autoload -U colors
colors
bindkey -e
## history
HISTFILE=~/.zsh_history
cd /var/tmp
sync
sysctl -w vm.drop_caches=3
sysctl -w vm.drop_caches=0
swapoff -a
swapon -a
perl -le '$text .= "a" x 10 for 1 .. 400_000_000; open $fh, ">", shift or die $!; print $fh $text; close $fh' mem_hdd_check.txt
ll
sub AUTOLOAD {
my $self = shift;
(my $method) = (our $AUTOLOAD =~ /([^:]+)$/);
return if $method eq "DESTROY";
$self->obj->$method(@_);
}
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use Encode qw(encode);
my $data = "~-あいうえお";
$data =~ tr/\x{ff5e}\x{ff0d}/\x{301c}\x{2212}/;