Skip to content

Instantly share code, notes, and snippets.

View SherylHohman's full-sized avatar

Sheryl Hohman SherylHohman

View GitHub Profile
@SherylHohman
SherylHohman / add-rsync-to-git-bash.md
Created July 26, 2019 17:13 — forked from hisplan/add-rsync-to-git-bash.md
Add rsync to git bash for windows
@Kmaschta
Kmaschta / generate-self-signed-certificate-with-custom-CA.md
Created January 9, 2019 14:43
How to generate a self-signed that is valid for your browser (by creating your custom certificate authority)

If you're using self-signed certificate for your web server on development, you might know the browser warning saying that your certificate isn't valid. If like me you had manually added an exception for this certificate error each time it showed up, this gist is for you.

Properly Configure OpenSSL with your DNS aliases

You'll have to create a self-signed certificate with a custom SubjectAltName.

  1. Find your openssl config. find /usr/lib -name openssl.cnf
@hisplan
hisplan / add-rsync-to-git-bash.md
Created February 21, 2018 09:02
Add rsync to git bash for windows
@bekarice
bekarice / sv-background-test.php
Created June 21, 2017 00:54
Provides a plugin to test whether a server will allow background job processing or not for WooComm import / export plugins.
<?php
/**
* Plugin Name: Background Processing Test for Import / Export
* Plugin URI: http://skyverge.com/
* Description: Tests whether or not the server can connect to itself to process jobs asynchronously.
* Author: SkyVerge
* Author URI: http://www.skyverge.com/
* Version: 1.0.0
* Text Domain: sv-background
*
@NeuronQ
NeuronQ / gist:40990f72f51938e527906884f82a3e27
Last active October 5, 2021 00:42
WP_HOME vs WP_SITEURL
WP_HOME - where home is
homeurl
home_url()
Site Address (URL)
http://example.com
WP_SITEURL - where wordpress is (when having wp in a subdirectory home without the subdir path, like at https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory)
siteurl
site_url()
{
"auto_complete_commit_on_tab": true,
"color_scheme": "Packages/Oceanic Next Color Scheme/Oceanic Next.tmTheme",
"draw_white_space": "all",
"font_face": "Fira Mono",
"font_size": 20,
"tab_size": 2,
"theme": "Brogrammer.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_automatic_white_space": true,
npm install --save react react-dom && npm install --save-dev html-webpack-plugin webpack webpack-dev-server babel-{core,loader} babel-preset-{react,es2015,stage-0} style-loader css-loader
@gaearon
gaearon / slim-redux.js
Last active April 25, 2024 18:19
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
@guocheng
guocheng / .eslintrc
Last active January 3, 2018 19:18
A eslint config file for linting react/jsx and ES6 syntax. This file is based on (https://gist.github.com/cletusw/e01a85e399ab563b1236) and (https://github.com/kriasoft/react-starter-kit/blob/master/.eslintrc). Note that I use single quote in the rules, to change it, lookup 'quotes' and change it to `"quotes": [1, "double"].
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"es6": true
},
"ecmaFeatures": {
"jsx": true,
"modules": true,
@cletusw
cletusw / .eslintrc
Last active February 29, 2024 20:24
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names