Skip to content

Instantly share code, notes, and snippets.

View max-hk's full-sized avatar

max-hk

View GitHub Profile
@blole
blole / win10-taskbar-never-combine-hide-labels.md
Created October 3, 2015 12:45
Make win10 taskbar buttons `Never combine, hide labels`

##Make win10 taskbar buttons Never combine, hide labels Normally, this option isn't available, and the valid options for how the taskbar button should behave are:

option registry value hide bit combine bit
Never combine 2 0 0
Combine when taskbar is full 1 0 1
Always combine, hide labels 0 1 1

These options are set in Taskbar and Start Menu Properties, accessible by right clicking the taskbar and selecting Properties.

@alvinpascoe
alvinpascoe / function-wrapping.js
Created September 23, 2015 19:41
JavaScript wrapping function and examples.
// Let's create a generic wrap() function we can use to override the behaviour of
// any function. Commonly used for correcting cross-browser bugs.
// object - object whose method is to be wrapped
// method - method to be wrapped
// wrapper - function to be executed instead of the original
function wrap(object, method, wrapper){
// Stores the original method
var fn = object[method];
@themightymo
themightymo / .gitignore NEW
Last active January 18, 2023 23:40 — forked from jjeaton/.gitignore
WordPress root .gitignore. Ignore everything and then opt-in (exclude from the ignore) for your custom code.
# codekit #
###########
.sass-cache/
.codekit-config.json
.config.codekit
# wpengine #
############
*~
@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active November 17, 2025 00:00
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
@PurpleBooth
PurpleBooth / README-Template.md
Last active December 3, 2025 00:19
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@carcinocron
carcinocron / debugger pause beforeunload
Last active July 22, 2025 08:53
Chrome: pause before redirect
// Run this in the F12 javascript console in chrome
// if a redirect happens, the page will pause
// this helps because chrome's network tab's
// "preserve log" seems to technically preserve the log
// but you can't actually LOOK at it...
// also the "replay xhr" feature does not work after reload
// even if you "preserve log".
window.addEventListener("beforeunload", function() { debugger; }, false)
@bmcalister
bmcalister / wordpress-nested-nav.php
Last active March 6, 2023 13:07
One dimensional wordpress nav object to nested array
<?php
class Nested_nav {
public $wp_nav;
public $nested_nav;
function __construct($menu, $args = null) {
$this->wp_nav = wp_get_nav_menu_items($menu, $args);
$this->nested_nav = $this->buildTree( $this->wp_nav );
@tracker1
tracker1 / 01-directory-structure.md
Last active November 7, 2025 05:49
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used
@danallison
danallison / downloadString.js
Created September 29, 2014 16:44
download string as text file
function downloadString(text, fileType, fileName) {
var blob = new Blob([text], { type: fileType });
var a = document.createElement('a');
a.download = fileName;
a.href = URL.createObjectURL(blob);
a.dataset.downloadurl = [fileType, a.download, a.href].join(':');
a.style.display = "none";
document.body.appendChild(a);
a.click();