It really grinds my gears when I see this pattern, in particular navigation bars and sidebars seem to attract it:
const navItems = [
{
title: 'home',
link: '/home',
},
#!/bin/bash | |
# This script helps with getting Frappe/ERPNext running quickly using | |
# the upstream Compose specifications. Not intended for production. | |
# | |
# Usage: | |
# | |
# $ git clone https://github.com/frappe/frappe_docker | |
# $ cd frappe_docker | |
# $ curl -Lo erpnext.sh <URL to this raw gist> | |
# |
if(function_exists('BWFAN_Core')){ | |
add_filter( 'cartflows_global_checkout_url', 'bwfan_passing_abandoned_args', 9.5, 1 ); | |
if(!function_exists('bwfan_passing_abandoned_args')){ | |
function bwfan_passing_abandoned_args( $link ) { | |
if ( ! isset( $_GET['bwfan-ab-id'] ) || empty( $_GET['bwfan-ab-id'] ) ) { | |
return $link; | |
} | |
$link = add_query_arg( array( 'bwfan-ab-id' => sanitize_text_field( $_GET['bwfan-ab-id'] ) ), $link ); |
Description: > | |
Script to create a SSL certificate, S3 bucket and Cloudfront distribution. | |
############################################################################### | |
Parameters: | |
############################################################################### | |
DomainName: | |
Type: String | |
Description: The domain name. |
#!/bin/bash | |
# Converter.sh by @xdavidhu | |
# This is a script inspired by the Bug Hunter's Methodology 3 by @Jhaddix | |
# With this script, you can convert domain lists to resolved IP lists without duplicates. | |
# Usage: ./converter.sh [domain-list-file] [output-file] | |
echo -e "[+] Converter.sh by @xdavidhu\n" | |
if [ -z "$1" ] || [ -z "$2" ]; then | |
echo "[!] Usage: ./converter.sh [domain-list-file] [output-file]" | |
exit 1 |
##################### | |
# | |
# Use this with or without the .gitattributes snippet with this Gist | |
# create a fixle.sh file, paste this in and run it. | |
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF) | |
# This Gist normalizes handling by forcing everything to use Unix style. | |
##################### | |
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF |
Pattern below allows for a bash script to be called via, say, cron and check to see if it is already running.
Useful for things like rsync
tasks.
PIDFILE=/var/run/myscriptname.pid
if [ -f $PIDFILE ]
then
PID=$(cat $PIDFILE)
#!/usr/bin/env bash | |
## | |
# Script for extracting single site from multisite | |
## | |
#SETUP | |
#static | |
wpdb="DATABASE NAME" |
import React from "react"; | |
import { render } from "react-dom"; | |
const ParentComponent = React.createClass({ | |
getDefaultProps: function() { | |
console.log("ParentComponent - getDefaultProps"); | |
}, | |
getInitialState: function() { | |
console.log("ParentComponent - getInitialState"); | |
return { text: "" }; |