This file contains hidden or 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/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use IO::Socket; | |
my $socket = IO::Socket::INET->new( | |
PeerAddr => 'localhost', |
This file contains hidden or 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/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Cache::Memcached::Fast; | |
use Parallel::ForkManager; | |
my $memd = Cache::Memcached::Fast->new({ |
This file contains hidden or 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/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use feature qw/say/; | |
use File::Find qw/find/; | |
# usage example: perl mouse_coding_rule_checker.pl lib/ | |
my $location = shift or die 'Please give location'; |
This file contains hidden or 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
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get build-dep vim-gnome | |
git clone https://github.com/vim/vim | |
cd vim | |
./configure --with-features=huge --enable-pythoninterp=yes --enable-python3interp=yes --enable-perlinterp=yes --enable-rubyinterp=yes --enable-luainterp=yes --with-luajit | |
make | |
sudo make install |
This file contains hidden or 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/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew install git ag ghq peco tmux reattach-to-user-namespace lua go tree jq nmap htop coreutils findutils gnu-sed colordiff hub automake autoconf shellcheck direnv cmake | |
brew install vim --with-luajit | |
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
git clone https://github.com/tokuhirom/plenv.git ~/.plenv | |
git clone https://github.com/tokuhirom/Perl-Build.git ~/.plenv/plugins/perl-build/ | |
exec $SHELL -l | |
plenv install 5.22.2 | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build |
This file contains hidden or 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
diff --git a/examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/JoinEventHandler.php b/examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/JoinEventHandler.php | |
index 568b51f..7569722 100644 | |
--- a/examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/JoinEventHandler.php | |
+++ b/examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/JoinEventHandler.php | |
@@ -46,9 +46,18 @@ class JoinEventHandler implements EventHandler | |
public function handle() | |
{ | |
$this->bot->replyText( | |
$this->joinEvent->getReplyToken(), |
This file contains hidden or 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 | |
ADJUST="10" | |
DB_NAME="your_table" | |
DUMP_LOCATION="/tmp" | |
cd ${DUMP_LOCATION} || exit 0 | |
mysqldump -uroot ${DB_NAME} > $(date "+%Y%m%d").dump | |
nice -n ${ADJUST} find . -mtime +5 -path "2*.dump" -exec rm -f {} \; |
This file contains hidden or 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 v6; | |
my $s = IO::Socket::INET.new(:host<ecosystem-api.p6c.org>, :port(80)); | |
$s.print("GET /projects.json HTTP/1.0\r\nHost: ecosystem-api.p6c.org\r\n\r\n"); | |
my $got = $s.get; | |
say $got; |
This file contains hidden or 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
public class Sig { | |
public static void main(String... args) { | |
Runtime.getRuntime().addShutdownHook(new Thread(() -> { | |
System.out.println("java finished"); | |
while (true) { | |
try { | |
Thread.sleep(1000); | |
} catch (InterruptedException e) { | |
} | |
} |
This file contains hidden or 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
#include <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stddef.h> | |
#include <string.h> | |
#ifdef __SSE4_2__ | |
#ifdef _MSC_VER | |
#include <nmmintrin.h> | |
#else | |
#include <x86intrin.h> |