Skip to content

Instantly share code, notes, and snippets.

View starsinmypockets's full-sized avatar

Paul Walker starsinmypockets

View GitHub Profile
@starsinmypockets
starsinmypockets / wp_cli_commands.sh
Created December 13, 2021 18:23
WP CLI commands
# Delete all spam comments
wp comment delete $(wp comment list --status=spam --format=ids) --force
{
"_id" : ObjectId("60816cd8349fec5f305a5163"),
"status" : "Completed",
"user" : ObjectId("60357a8562d28744a869c2ca"),
"items" : [
{
"_id" : ObjectId("6082e5b8c249dc2488b4e1e7"),
"product" : ObjectId("6082e5a5c249dc2488b4e1df"),
"registrations" : [
{
import React, { Component } from 'react'
export class Navigation extends Component {
render() {
return (
<div className='app_navigation' id='app_navigation'>
<div
className={`navsec ${this.props.currentStep === 1 ? 'active' : ''}`}
onClick={() => this.props.handleSteps(1)}
>
// After
import PropTypes from 'prop-types';
const HelpText = (props) => {
const { currentStep, handleSteps, formCount } = props;
return (
<div className="app_navigation" id="app_navigation">
<div
tabIndex="0"
@starsinmypockets
starsinmypockets / react-app-factory.js
Created May 26, 2020 00:00
Idea for React App Factory
/**
* author Daniel Pehreson
*
* Notes from Philly Dev Slack:
* > If you’re not 100% sure where you’re getting dropped into, a pattern like that would allow
* > varying levels of flexibility / complexity in the config setup appropriate to who is using the dashboard.
* > The exact way you split it up is not important, it’s just a matter of splitting up the responsibilities
* > for things so that you can adapt.
*
* > One is just the component itself, and assumes the app has created it’s own react node tree and knows how to
@starsinmypockets
starsinmypockets / react-app-factory.js
Created May 26, 2020 00:00
Idea for React App Factory
/**
* author Daniel Pehreson
*
* Notes from Philly Dev Slack:
* > If you’re not 100% sure where you’re getting dropped into, a pattern like that would allow
* > varying levels of flexibility / complexity in the config setup appropriate to who is using the dashboard.
* > The exact way you split it up is not important, it’s just a matter of splitting up the responsibilities
* > for things so that you can adapt.
*
* > One is just the component itself, and assumes the app has created it’s own react node tree and knows how to
Skipping, instances already prepared.
--> Scenario: 'default'
--> Action: 'converge'
PLAY [Converge] ****************************************************************
[Fri Apr 10 23:06:17.338625 2020] [:error] [pid 2961:tid 139687386769152] [remote 10.177.19.22:31627] mod_wsgi (pid=2961): Target WSGI script '
/etc/ckan/apache.wsgi' cannot be loaded as Python module.
[Fri Apr 10 23:06:17.338749 2020] [:error] [pid 2961:tid 139687386769152] [remote 10.177.19.22:31627] mod_wsgi (pid=2961): Exception occurred p
rocessing WSGI script '/etc/ckan/apache.wsgi'.
[Fri Apr 10 23:06:17.338779 2020] [:error] [pid 2961:tid 139687386769152] [remote 10.177.19.22:31627] Traceback (most recent call last):
[Fri Apr 10 23:06:17.338800 2020] [:error] [pid 2961:tid 139687386769152] [remote 10.177.19.22:31627] File "/etc/ckan/apache.wsgi", line 10,
in <module>
[Fri Apr 10 23:06:17.338828 2020] [:error] [pid 2961:tid 139687386769152] [remote 10.177.19.22:31627] application = loadapp('config:%s' % c
onfig_filepath)
[Fri Apr 10 23:06:17.338839 2020] [:error] [pid 2961:tid 139687386769152] [remote 10.177.19.22:31627] File "/usr/lib/ckan/lib/python2.7/site-
@starsinmypockets
starsinmypockets / gist:12c03a3bafcba3bac99b7fdd7d01a68f
Created March 23, 2020 12:55 — forked from djaiss/gist:85a0ada83e6bca68e41e
Block Twitter/Facebook in your /etc/hosts
# Block Facebook IPv4
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 login.facebook.com
127.0.0.1 www.login.facebook.com
127.0.0.1 fbcdn.net
127.0.0.1 www.fbcdn.net
127.0.0.1 fbcdn.com
127.0.0.1 www.fbcdn.com
127.0.0.1 static.ak.fbcdn.net
@starsinmypockets
starsinmypockets / gist:f399b34d9c762a4da961bdf0545746fc
Created March 23, 2020 12:55 — forked from djaiss/gist:85a0ada83e6bca68e41e
Block Twitter/Facebook in your /etc/hosts
# Block Facebook IPv4
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 login.facebook.com
127.0.0.1 www.login.facebook.com
127.0.0.1 fbcdn.net
127.0.0.1 www.fbcdn.net
127.0.0.1 fbcdn.com
127.0.0.1 www.fbcdn.com
127.0.0.1 static.ak.fbcdn.net