Skip to content

Instantly share code, notes, and snippets.

View ikuwow's full-sized avatar
🏠
Working from home

Ikuo Degawa ikuwow

🏠
Working from home
View GitHub Profile
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 / 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>
@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 / file0.txt
Created September 12, 2016 14:24
Powerlineは導入が面倒だからlightline.vim使うといいよ ref: http://qiita.com/ikuwow/items/fbe5ad59efd8e5d3df62
NeoBundle 'itchyny/lightline.vim'
@ikuwow
ikuwow / logtest-counter.yml
Created September 23, 2016 07:56
logtest-counter.yml
apiVersion: v1
kind: Pod
metadata:
name: counter-logger
spec:
containers:
- name: date-count
image: ubuntu:14.04
args: [bash, -c, 'for ((i = 0; ; i++)); do echo "$i: $(date)" >> /var/log/datelog.log; echo $RANDOM >> /var/log/randomlog.log; sleep 3; done']
volumeMounts:
#!/bin/bash
# Randomly choose pods, and kubectl exec
# usage ./kubeexec.sh hostname
pod_count=$(kubectl get pods -o name | wc -l)
pod_index=`echo "scale=0; $pod_count * $RANDOM / 32767 + 1" | bc`
pod=$(kubectl get pods -o name | awk "NR==$pod_index" | sed -e 's/pod\///g')
/usr/local/bin/kubectl exec $pod $@
@ikuwow
ikuwow / rm-old-timemachine-backup.sh
Created October 16, 2016 12:36
Remove Old Timemachine Backup Script
#!/bin/bash
cd /Volumes/Time\ Machine/Backups.backupdb/Ikuo’s\ Mac\ mini
BACKUPS=(\
2015-03-23-093603
2015-04-13-032009
2015-05-11-005904
2015-06-01-000440
2015-07-06-075631
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@ikuwow
ikuwow / file0.txt
Created December 9, 2016 15:10
IBM Bluemix Container Serviceを少しだけ触ってみる(途中) ref: http://qiita.com/ikuwow/items/afdbf7994506dcd90857
502 Bad Gateway: Registered endpoint failed to handle the request.
# -*- coding: utf-8 -*-
import json, codecs, os
srcdir = 'perdate/'
destdir = 'perdate_tsv/'
if not os.path.exists(destdir):
os.mkdir(destdir)