-
added steps to fix markdown via cli (extra script)
-
autofix in vs code on save, add this setting:
"editor.codeActionsOnSave": { "source.fixAll.markdownlint": true }
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Using a JavaScript proxy for a super low code REST client */ | |
// via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg | |
// also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3 | |
// also see https://github.com/fastify/manifetch | |
// also see https://github.com/flash-oss/allserver | |
// and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
const createApi = (url) => { | |
return new Proxy({}, { | |
get(target, key) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async function generateReplies(document) { | |
// https://conventionalcomments.org/#labels | |
const LABEL = { | |
praise: "praise", | |
nitpick: "nitpick", | |
suggestion: "suggestion", | |
issue: "issue", | |
todo: "todo", | |
question: "question", | |
thought: "thought", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import $ from 'jquery'; | |
import plugin from './plugin'; | |
class ScrollToTop { | |
constructor(element, options) { | |
const $element = $(element); | |
$(window).scroll(function () { | |
if ($(this).scrollTop() > options.offset) { | |
$element.fadeIn(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This code is licensed under the terms of the MIT license | |
* | |
* Deep diff between two object, using lodash | |
* @param {Object} object Object compared | |
* @param {Object} base Object to compare with | |
* @return {Object} Return a new object who represent the diff | |
*/ | |
function difference(object, base) { | |
function changes(object, base) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
'2010-11-24' AS date_begin, | |
'2015-01-26' AS date_end, | |
day_of_week, | |
AVG(comment_count) AS average_comments | |
FROM ( | |
SELECT | |
comment_date, | |
DAYNAME(comment_date) day_of_week, | |
DAYOFWEEK(comment_date) day_num, |
wp-config.php:
define( 'DISABLE_WP_CRON', true );
Cronjob: one of:
*/15 * * * * wget -q -O - http://www.website.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
*/15 * * * * curl http://www.website.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1
*/15 * * * * cd /home/user/public_html; php wp-cron.php > /dev/null 2>&1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load DSL and Setup Up Stages | |
require 'capistrano/setup' | |
# Includes default deployment tasks | |
require 'capistrano/deploy' | |
# Custom tasks | |
require 'capistrano/composer' | |
require 'capistrano/npm' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['angular'], function(angular){ | |
'use strict'; | |
angular.module('Filters') | |
.filter('UrlFriendly', [ | |
function(){ | |
return function(text, separator, lowercase){ | |
var output, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
VERSION="20200421.1" | |
_usage() { | |
cat << __EOF | |
$0 usage: |
NewerOlder