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 | |
users=("spring-raining" "myr523" "ak1t0") | |
i=0 | |
mkdir ~/.ssh | |
for user in ${users[@]}; do | |
curl -s -S https://github.com/${users[i]}.keys >> ~/.ssh/authorized_keys | |
let i++ | |
done |
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
// global variable for redis connection pool | |
var server = "localhost:6379" | |
var Pool = redis.Pool{ | |
MaxIdle: 3, | |
IdleTimeout: 240 * time.Second, | |
Dial: func() (redis.Conn, error) { | |
c, err := redis.Dial("tcp", server) | |
if err != nil { |
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
require 'mysql2' | |
require 'net/http' | |
images = [] | |
client = Mysql2::Client.new(:host => "localhost", :password => "isucon", :username => "isucon", :database => "isubata") | |
client.query("SELECT name FROM image").each do |col1| | |
images.push(col1["name"]) | |
end |
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
# set prefix key C-X | |
set-option -g prefix C-g | |
unbind C-b | |
# UI | |
set-option -g status-position top | |
set-option -g default-terminal screen-256color | |
set -sg escape-time 1 | |
## Powerline | |
source "/usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf" |
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
#include <stdio.h> | |
#include <stdlib.h> | |
// for syscall() | |
#include <sys/syscall.h> | |
// for getpid() | |
#include <sys/types.h> | |
// for read() and execl() | |
#include <unistd.h> |
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-package cperl-mode | |
:ensure t | |
:init | |
(add-hook 'cperl-mode-hook 'flycheck-mode) | |
(add-hook 'cperl-mode-hook 'auto-complete-mode) | |
:mode ("\.pl$" . cperl-mode) | |
:config | |
;; cperl-mode | |
(setq cperl-indent-level 4 | |
cperl-continued-statement-offset 4 |
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
{ | |
"settings": { | |
"analysis": { | |
"analyzer": { | |
"ja_ngram_analyzer": { | |
"tokenizer": "ja_ngram_tokenizer" | |
} | |
}, | |
"tokenizer": { | |
"ja_ngram_tokenizer": { |
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 ( | |
"fmt" | |
"github.com/PuerkitoBio/goquery" | |
"github.com/agnivade/levenshtein" | |
"log" | |
"net/http" | |
"os" | |
"strconv" |
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
FROM debian:buster-slim | |
RUN apt-get update && apt-get -y upgrade && apt-get install -y apt-utils apt-transport-https curl gpg | |
COPY tor.list /etc/apt/ | |
RUN curl https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import | |
RUN gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add - | |
RUN apt-get update && apt-get -y install tor | |
COPY torrc /etc/tor/torrc |
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] | |
name = "arti-client-example" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
arti-client = "0.5.0" | |
futures = "0.3" |