Skip to content

Instantly share code, notes, and snippets.

View ikuwow's full-sized avatar

Ikuo Degawa ikuwow

View GitHub Profile
@ikuwow
ikuwow / file0.txt
Created September 12, 2016 14:24
Powerlineは導入が面倒だからlightline.vim使うといいよ ref: http://qiita.com/ikuwow/items/fbe5ad59efd8e5d3df62
NeoBundle 'itchyny/lightline.vim'
@ikuwow
ikuwow / file0.txt
Created August 13, 2016 09:47
構成管理したサーバーにSSHした不届き者に警告メッセージを出してみる ref: http://qiita.com/ikuwow/items/81500455485239a3edcf
$ ssh somehost
Last login: Sat Aug 13 16:56:53 2016 from 0.0.0.0
__| __|_ )
_| ( / Amazon Linux AMI
___|\___|___|
https://aws.amazon.com/amazon-linux-ami/2016.03-release-notes/
#######################################################
## WARNING: THIS SERVER IS CONFIGURED WITH ANSIBLE!! ##
@ikuwow
ikuwow / no-rightclick.html
Created July 30, 2016 09:20
Fucking "Disable right click"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h1>右クリック禁止</h1>
<p>クリックしてみてね</p>
Step 13 : RUN yum -y install mod_ssl sendmail sendmail-cf && yum clean all
---> Running in 4508cbfff184
Loaded plugins: fastestmirror
http://ftp.riken.jp/Linux/fedora/epel/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
Trying other mirror.
http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
Trying other mirror.
http://ftp.tsukuba.wide.ad.jp/Linux/fedora/epel/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
Trying other mirror.
http://kartolo.sby.datautama.net.id/EPEL/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
@ikuwow
ikuwow / this_is_teratail2.php
Created June 13, 2016 07:21
this_is_teratail2.php
<?php
/**
* teratail
*
* by Leverages Co. Ltd. Technology Media Lab
*/
function teratail(AwesomeEngineer $you) {
if (!isset($you->problems)) {
return "I am always happy.";
<?php
/**
* teratail - Q&A community for every thinking engineer
*
* @author Leverages Co. Ltd. Technology Media Lab.
* @since 2014/07/16
*/
function teratail(ThinkingEngineer $you)
{
$question = new Question($you->problems);
#!/bin/bash
WORKDIR=~/Desktop/untitled
OUTPUTDIR=~/Desktop/pdfed
[[ ! -d $OUTPUTDIR ]] && mkdir $OUTPUTDIR
echo $WORKDIR
for FOLDER in $WORKDIR/*; do
@ikuwow
ikuwow / brewdoctorの出力
Last active May 9, 2016 05:10
phpbrew @ Mac で複数バージョンのphpの環境構築するAnsible Playbook ref: http://qiita.com/ikuwow/items/58d5e36913266d441557
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
@ikuwow
ikuwow / file2.txt
Created April 25, 2016 10:52
Macでpyenv使ってPythonの環境設定をするansible playbook ref: http://qiita.com/ikuwow/items/4a1d784876f70a1abd74
if [ `which pyenv` ]; then
eval "$(pyenv init - --no-rehash)" # adding --no-rehash makes this faster
fi
#!/bin/bash
# re-allocate shards of node "Wildboys" (ip=10.252.1.114)
variable=$(curl -X GET 10.252.1.114:9200/_cat/shards | grep UNASSIGNED | awk -v OFS=, '{print $1,$2,$3}')
for shard in $variable; do
index=$(echo $shard | cut -d, -f1)
snum=$(echo $shard | cut -d, -f2)
pr=$(echo $shard | cut -d, -f3)
echo