Skip to content

Instantly share code, notes, and snippets.

@jiskanulo
jiskanulo / alias
Created April 13, 2020 09:26
~/.aws/cli/alias
[toplevel]
ss =
!f() {
aws_profile=${1:-"saml"}
if [ -z "$aws_profile" ]; then
echo "you must be specified aws_profile as argument."
echo "exaple: aws ss <aws_profile>"
exit 1
fi
diff --git a/share/php-build/default_configure_options b/share/php-build/default_configure_options
index 7355cf1..b9de2eb 100644
--- a/share/php-build/default_configure_options
+++ b/share/php-build/default_configure_options
@@ -6,8 +6,8 @@
--enable-exif
--enable-zip
--with-zlib
---with-zlib-dir=/usr
---with-bz2
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --with-config-file-path=/Users/jiska/.anyenv/envs/phpenv/versions/7.3.5/etc --with-config-file-scan-dir=/Users/jiska/.anyenv/envs/phpenv/versions/7.3.5/etc/conf.d --prefix=/Users/jiska/.anyenv/envs/phpenv/versions/7.3.5 --libexecdir=/Users/jiska/.anyenv/envs/phpenv/versions/7.3.5/libexec --datadir=/Users/jiska/.anyenv/envs/phpenv/versions/7.3.5/share/php --mandir=/Users/jiska/.anyenv/envs/phpenv/versions/7.3.5/share/man --without-pear --with-gd --enable-sockets --with-jpeg-dir=/usr --enable-exif --enable-zip --with-zlib --with-zlib-dir=/usr --with-bz2 --enable-intl --with-kerberos --enable-soap --enable-xmlreader --with-xsl --enable-ftp --enable-cgi --with-curl=/usr --with-tidy --with-xmlrpc --enable-sysvsem --enable-sysvshm --enable-shmop --with-mysqli=mysqlnd --with-p
#!/bin/bash
mkdir -p shinycolors.idolmaster.jp
for p in $(curl -s https://shinycolors.idolmaster.jp/api/comic.php | jq '.[].comic, .[].thumbnail' -r); do
download_url="https://shinycolors.idolmaster.jp${p}"
file_name=$(basename ${p} | awk -F '?' '{print $1}')
wget -x $download_url -O shinycolors.idolmaster.jp/$file_name
done
@jiskanulo
jiskanulo / Vagrantfile
Created February 13, 2018 05:44
try Nginx on Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.network "forwarded_port", guest: 80, host: 48080
config.vm.provision "shell", inline: <<-SHELL
cat << EOF > /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
@jiskanulo
jiskanulo / wrong.sh
Created April 14, 2016 09:51
I was wrong
#!/bin/bash
if [ false ]; then
echo "TRUE"
else
echo "FALSE"
fi
/out
/vendor
#!/bin/bash
set -e
dir=$(cd ${1:-.} && pwd)
if [ $? -ne 0 ] || [ ! -d "$dir" ] || [ ! -w "$dir" ]; then
echo "$dir can not writable directory, abort."
exit 1
fi
@jiskanulo
jiskanulo / pre-commit
Created June 16, 2015 12:23
Git pre-commit hook: detect file size over 100MB
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
# Redirect output to stderr.