Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use IO::Socket;
my $socket = IO::Socket::INET->new(
PeerAddr => 'localhost',
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use Cache::Memcached::Fast;
use Parallel::ForkManager;
my $memd = Cache::Memcached::Fast->new({
#!/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';
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
/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
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(),
#!/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 {} \;
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;
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) {
}
}
#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>