$ openssl genrsa -out private.key 4096openssl req -new -sha256 \| // This app initially started from Flavio Copes analytics example | |
| // but diverged quite a bit to generate images as well as track views | |
| // https://flaviocopes.com/count-visits-static-site/ | |
| const express = require('express') | |
| const app = express() | |
| // no db - so global var to keep track of count | |
| let counter = 0 |
| // create a bookmark and use this code as the URL, you can now toggle the css on/off | |
| // thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
| javascript: (function() { | |
| var elements = document.body.getElementsByTagName('*'); | |
| var items = []; | |
| for (var i = 0; i < elements.length; i++) { | |
| if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) { | |
| items.push(elements[i]); | |
| } | |
| } |
| #!/bin/sh | |
| base=$1 | |
| if [ -z $base ] | |
| then | |
| echo No argument given | |
| else | |
| ## | |
| ## iOS files | |
| convert "$base" -resize 20x20! "Icon-20.png" |
| import React from 'react' | |
| import Button from './Button.jsx' | |
| const Application = () => { | |
| return ( | |
| <div> | |
| <Button>Click me</Button> | |
| <Button secondary>Click me</Button> | |
| <Button inverse big> | |
| Click me |
| # BetterTouchTool reset trial time | |
| # ** All preference will reset | |
| echo "remove ~/Library/Preferences/com.hegenberg.BetterTouchTool.plist" | |
| rm -rf ~/Library/Preferences/com.hegenberg.BetterTouchTool.plist | |
| echo "Done" | |
| echo "remove ~/Library/Application\ Support/BetterTouchTool/" | |
| rm -rf ~/Library/Application\ Support/BetterTouchTool/ | |
| echo "Done" |
| <!-- wp:paragraph {"align":"center","customTextColor":"#000000","backgroundColor":"very-light-gray","fontSize":"small"} --> | |
| <p style="color:#000000;text-align:center" class="has-background has-small-font-size has-very-light-gray-background-color">Gutenberg Sample Content.<br/>Put together with ❤️ by <a href="https://artisanthemes.io/">Artisan Themes</a>.</p> | |
| <!-- /wp:paragraph --> | |
| <!-- wp:heading {"level":1} --> | |
| <h1>This is a heading (H1)</h1> | |
| <!-- /wp:heading --> | |
| <!-- wp:heading --> | |
| <h2>This is a heading (H2)</h2> |
🚨 2020 Update: I recommend using mkcert to generate local certificates. You can do everything below by just running the commands brew install mkcert and mkcert -install. Keep it simple!
This gives you that beautiful green lock in Chrome. I'm assuming you're putting your SSL documents in /etc/ssl, but you can put them anywhere and replace the references in the following commands. Tested successfully on Mac OS Sierra and High Sierra.
sudo nano /etc/ssl/localhost/localhost.conf
This is a basic custom editable Gutenberg block. Files explained below.
block.js — We register Custom Gutenberg block here.editor.css _ Block CSS for the editor.style.css — Block CSS for the front end.index.php — Enqueue block's assets for the editor and the front end.| # Install chromedriver from https://sites.google.com/a/chromium.org/chromedriver/downloads | |
| import os | |
| from optparse import OptionParser | |
| from selenium import webdriver | |
| from selenium.webdriver.chrome.options import Options | |
| CHROME_PATH = '/usr/bin/google-chrome' |