Skip to content

Instantly share code, notes, and snippets.

jamiejohnsonkc / net start & stop commands
Created Aug 11, 2018
net start / net stop #win, #cmd
View net start & stop commands
net start [serviceName]
net stop [serviceName]
tell you whether they have succeeded or failed pretty clearly. For example
U:\>net stop alerter
The Alerter service is not started.
View custom-fields-for-woocommerce.php
* You can find the complete tutorial for this here:
* Alternatively, check out the plugin
dixonsiu /
Last active Apr 27, 2021
Python scripts for Pandoc
dixonsiu /
Last active Jun 9, 2021
How to convert markdown link to html using Pandoc

How to convert markdown link to html using Pandoc


Pandoc cannot convert a link's URL as expected.



<a href="./">Document</a>
View Overloader.php
* Trait helps to allow for some limited overloading of
* methods in the class this is attached to.
trait Overloader {
paulirish /
Last active Jun 23, 2021
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
hraban / pre-commit
Last active May 12, 2021
Prevent accidentally committing debug code in Git
View pre-commit
# This pre-commit hook will prevent you from committing any line (or filename) containing
# the string NOCOMMIT. Use that tag in comments around source code you want to avoid
# accidentally committing, like temporary IP addresses or debug printfs.
# To add it to an existing repository, save it to .git/hooks/pre-commit (or append, if
# that file already exists). Remember to make executable (chmod +x ...)
# To automatically add this pre-commit hook to every repository you create or clone:
jakzal / crawler-edit.php
Last active Apr 26, 2020
Removing nodes with DomCrawler
View crawler-edit.php
- "symfony/dom-crawler: ~2.3"
- "symfony/css-selector: ~2.3"
use Symfony\Component\DomCrawler\Crawler;
$html = <<<HTML
maxivak / 00.
Last active Jun 23, 2021
Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
View 00.
staltz /
Last active Jun 23, 2021
The introduction to Reactive Programming you've been missing