Skip to content

Instantly share code, notes, and snippets.

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

amekusa amekusa

🏠
Working from home
View GitHub Profile
#!/bin/bash
# git-flow make-less installer for *nix systems, by Rick Osborne
# Based on the git-flow core Makefile:
# http://github.com/nvie/gitflow/blob/master/Makefile
# Licensed under the same restrictions as git-flow:
# http://github.com/nvie/gitflow/blob/develop/LICENSE
# Does this need to be smarter for each host OS?
div {
filter: e("progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#000000')");
// GradientType represents direction
}
@amekusa
amekusa / .profile
Last active April 23, 2020 06:35
Boost up your shell
# --------------------------------
# BASH Configuration
# Place this at: ~/
# ================================
export HOMEBREW_PREFIX="${HOME}/Library/Homebrew"
export HOMEBREW_TEMP="${HOMEBREW_PREFIX}/.tmp"
export NODE_PATH="${HOMEBREW_PREFIX}/lib/node_modules"
export COMPOSER_HOME="${HOME}/.composer"
export ANDROID_HOME="${HOMEBREW_PREFIX}/opt/android-sdk"
(animate = function () {
console.log("Animating ...")
requestAnimationFrame(animate);
})();

WordPress TIPs

The earliest hook that conditional tags work in is "wp"

Example:

add_action('wp', function () {
	if (is_singular()) echo 'This page is singular';
});

CSS Troubleshooting

overflow: hidden not Working on Android

Force position to be static.

@amekusa
amekusa / server.nginx.conf
Created August 7, 2016 09:04
Dynamic Virtual Hosts
server {
listen 80;
# listen on the www host
server_name ~^(www\.)(?<domain>.+)$;
# and redirect to the non-www host (declared below)
return 301 $scheme://$domain$request_uri;
}
@amekusa
amekusa / .gitignore
Created February 25, 2017 10:02
Global .gitignore
# ------------------------------------------------ ---- -- -
# This is global .gitignore
# Place this on your home directory And run this command:
# git config --global core.excludesfile ~/.gitignore
# -------------------------------- ---- -- -
# Created by https://www.gitignore.io/api/eclipse,vim,macos,linux,windows,archives
### Archives ###
# It's better to unpack these files and commit the raw source because
@amekusa
amekusa / certbot.service
Last active July 11, 2017 14:18
Let's Encrypt Auto Renewal
[Unit]
Description=Let's Encrypt renewal
[Service]
Type=oneshot
ExecStart=/usr/bin/certbot renew --pre-hook "/usr/bin/systemctl stop nginx.service" --post-hook "/usr/bin/systemctl start nginx.service" --quiet --agree-tos
ExecStartPost=/bin/systemctl reload nginx.service
@amekusa
amekusa / mapcrafter.service
Last active July 31, 2017 05:49
Minecraft Server Settings
[Unit]
Description=Minecraft World Map Renderer
[Service]
Type=oneshot
ExecStart=/usr/bin/nice -n 10 /usr/bin/mapcrafter -c /etc/mapcrafter/render.conf