Skip to content

Instantly share code, notes, and snippets.

@kuropen
kuropen / gist:6202636
Last active December 20, 2015 22:09
JSON exported from new elecwarn web (for newest entry; please wait for history of specific company later)
{
"chugoku": {
"id": 354259,
"company": "chugoku",
"consume": 777,
"capacity": 1206,
"recorddate": "2013-08-09T23:30:00+09:00",
"sysver": 2,
"createdAt": null,
"updatedAt": null
@kuropen
kuropen / gist:6255997
Created August 17, 2013 09:01
JSON exported from new elecwarn web (specific company)
[
{
"id": 367570,
"company": "tohoku",
"consume": 1109,
"capacity": 1458,
"recorddate": "2013-08-17T17:50:00+09:00",
"sysver": 2,
"createdAt": null,
"updatedAt": null
@kuropen
kuropen / gist:11321818
Last active August 29, 2015 14:00
Shell script to execute a node.js script with daemonized by forever which is installed under management of nodebrew
#!/bin/bash
cd /home/kuropen1/nodehost/elecwarn3-web
PORT=61595 /home/kuropen1/.nodebrew/current/bin/forever start -c /home/kuropen1/.nodebrew/current/bin/node app.js > ~/tmp/forever-start.log
@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
@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 / 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 / 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 / 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 / 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 / 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: