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

CSS Troubleshooting

overflow: hidden not Working on Android

Force position to be static.

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';
});
(animate = function () {
console.log("Animating ...")
requestAnimationFrame(animate);
})();
@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"
div {
filter: e("progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff',endColorstr='#000000')");
// GradientType represents direction
}
#!/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?
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\{Your Device ID}\Device Parameters]
"FlipFlopHScroll"=dword:00000001
"FlipFlopWheel"=dword:00000001
@amekusa
amekusa / bresenham3d
Created November 13, 2015 03:45 — forked from yamamushi/bresenham3d
C++ Bresenham 3d Line Drawing Algorithm
// Bresenham3D
//
// A slightly modified version of the source found at
// http://www.ict.griffith.edu.au/anthony/info/graphics/bresenham.procs
// Provided by Anthony Thyssen, though he does not take credit for the original implementation
//
// It is highly likely that the original Author was Bob Pendelton, as referenced here
//
// ftp://ftp.isc.org/pub/usenet/comp.sources.unix/volume26/line3d
//
@amekusa
amekusa / WordPress Troubleshooting.md
Last active December 3, 2015 00:55
WordPress Troubleshooting

WordPress Troubleshooting

Why is my post meta changes saved when I clicked "Preview Changes"

Use update_metadata() instead of update_post_meta().

How to remove leading /blog/ on permalink

  1. Settings -> Permalinks -> Common Setting -> Default
  2. Admin -> Sites -> (root site) Permalink Sturcture -> /%category%/%post_id%/
@amekusa
amekusa / Random TIPs.md
Last active January 20, 2016 09:22
Random TIPs

Random TIPs

OS X

How to get rid of firewall “accept incoming connections” dialog

sudo codesign --force --deep --sign - /path/to/application.app

“{Application Name} was unable to find a valid jvm”