Skip to content

Instantly share code, notes, and snippets.

@kuropen
kuropen / prismic-id.json
Created August 28, 2021 15:38
Old Penguinone Prismic ID
{"Xf7DUhAAACIA5oN9":"6fe9f918-4a1e-456b-b4e4-907ac64d1c54","Xf7DlRAAACQA5oSn":"7510b626-4662-460c-b966-854c16717244","Xf7EABAAACEA5oaE":"97cd0a3c-aaa1-4af7-ad0f-c113aa63041e","Xf7E0hAAACQA5ooh":"0344f788-e48d-4d52-8c2f-a40e3ae0192b","XjgZNxAAACEAj4_B":"200203-pray-for-health","XrvXdxAAACIAvXvx":"20200513_human_only_recognize","XsCRVRAAAJdw0lc1":"20200517_people_who_have_multiple_home","XsdjwRIAACQAQBHu":"20200522_monday_morning_quaterback","XzTwqBAAACIAfsAO":"20200813-good-luck-remains","X0E7fRAAAPtVtRwv":"20200822_moral_of_drivers","X1eLdRAAANUiF6bo":"20200908_my_mobilephones"}
@kuropen
kuropen / lambda_function.py
Created August 30, 2018 14:10
Lambda function to generate 410 error
import boto3
# このスクリプトをLambdaに入れ、API Gatewayで「Lambdaプロキシ統合」のエンドポイントを作成し、
# パス「/」「/{proxy+}」に対してメソッド「ANY」でこのスクリプトに向ける。
# エラーメッセージをS3に格納しているためIAMロールでS3へのアクセス権を設定する。
# エラーメッセージの格納されたバケット名
AWS_S3_BUCKET_NAME = 'becodon-503'
# エラーメッセージの格納されたオブジェクト名
GET_OBJECT_KEY_NAME = '410.html'
@kuropen
kuropen / Dockerfile
Created February 22, 2018 14:14
Dockerfile for mastodon-alliance-bot
FROM node:8
ENV TINI_VERSION v0.17.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/local/bin/tini
RUN chmod +x /usr/local/bin/tini
RUN git clone https://github.com/wd-shiroma/mastodon-federation-bot /bot
ADD config.json /bot/config/default.json
WORKDIR /bot
@kuropen
kuropen / keybase.md
Created January 26, 2018 10:25
keybase.md

Keybase proof

I hereby claim:

  • I am kuropen on github.
  • I am kuropen (https://keybase.io/kuropen) on keybase.
  • I have a public key ASCGp1q9hVvpZ8KoPIZETpYfi8HX-KbcUfvP-rcqf__X0Ao

To claim this, I am signing this object:

@kuropen
kuropen / Vagrantfile
Created October 13, 2017 12:41
Vagrantfile for gitbook
# -*- 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
@kuropen
kuropen / Dockerfile
Created May 2, 2017 02:26
Dockerfile for sqlmap
FROM python:2.7-alpine
RUN apk add --no-cache git
RUN mkdir -p /usr/local && cd /usr/local && git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git
VOLUME /root/.sqlmap
WORKDIR /usr/local/sqlmap
ENTRYPOINT /bin/sh
@kuropen
kuropen / Dockerfile
Last active April 21, 2017 15:31
PHP公式のDocker ImageでLaravelを動かす ref: http://qiita.com/kuropen/items/1f0e5b9f0f78d74409c4
FROM php:7.1-apache
RUN apt-get update && apt-get -y install git unzip
RUN DEFAULT_SITE_FILE=/etc/apache2/sites-enabled/000-default.conf && TMP=$(mktemp) && sed 's!/var/www/html!/var/www/html/public!' $DEFAULT_SITE_FILE > $TMP && mv $TMP $DEFAULT_SITE_FILE
RUN curl -L https://raw.githubusercontent.com/php/php-src/master/php.ini-production | sed 's/expose_php = On/expose_php = Off/' > /usr/local/etc/php/php.ini
RUN a2enmod rewrite
COPY . /var/www/html
WORKDIR /var/www/html
@kuropen
kuropen / nginx.service
Created November 17, 2015 04:56
Modification of nginx.service to use unix socket on nginx installed from official repo for CentOS 7
[Unit]
Description=nginx - high performance web server
Documentation=http://nginx.org/en/docs/
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf
ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf
@kuropen
kuropen / gist:60b2bd10c602f8f7dd2e
Created April 10, 2015 09:22
Simplest? way to determine file name based on clock
#!/bin/bash
FILENAME=$(LANG=en date | sed 's/[ :]/_/g')
echo $FILENAME
@kuropen
kuropen / gist:43d25f3289707a643948
Created December 18, 2014 02:02
Building Multiple Android Studio Project in a Directory
#!/bin/zsh
foreach d ($(find . -depth 1 -type d))
echo Entering Directory: $d
if [ -f $d/build.gradle ]; then
echo build.gradle Found. Starting Build.
cd $d
./gradlew clean build
echo Exit status code: $?
if [ $? -eq 0 ]; then