Original from http://jekyllsnippets.com/excluding-jsonify-your-site/
Create a new site.json and add the above code (site.json.rb)
| // 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]); | |
| } | |
| } |
| sudo apt-get install curl | |
| curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - | |
| sudo apt-get install nodejs | |
| node -v | |
| npm -v |
Original from http://jekyllsnippets.com/excluding-jsonify-your-site/
Create a new site.json and add the above code (site.json.rb)
| <?php | |
| // Display variations dropdowns on shop page for variable products | |
| add_filter( 'woocommerce_loop_add_to_cart_link', 'woo_display_variation_dropdown_on_shop_page' ); | |
| function woo_display_variation_dropdown_on_shop_page() { | |
| global $product; | |
| if( $product->is_type( 'variable' )) { | |
| import React, { Component } from 'react' | |
| import { Redirect } from 'react-router' | |
| export default class ContactForm extends Component { | |
| constructor () { | |
| super(); | |
| this.state = { | |
| fireRedirect: false | |
| } | |
| } |
| /* | |
| This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects. | |
| It will generate several classes such as: | |
| .m-r-10 which gives margin-right 10 pixels. | |
| .m-r-15 gives MARGIN to the RIGHT 15 pixels. | |
| .m-t-15 gives MARGIN to the TOP 15 pixels and so on. | |
| .p-b-5 gives PADDING to the BOTTOM of 5 pixels | |
| .p-l-40 gives PADDING to the LEFT of 40 pixels |
###Sketch trial non stop
Open hosts files:
$ open /private/etc/hosts
Edit the file adding:
127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
| Working with DOM | Working with JS | Working With Functions |
|---|---|---|
| Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
| Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
| Create DOM Elements | Conditionals |
| - Open Automator | |
| - File -> New -> Service | |
| - Change "Service Receives" to "files or folders" in "Finder" | |
| - Add a "Run Shell Script" action | |
| - Change "Pass input" to "as arguments" | |
| - Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
| - Save it as something like "Open in Visual Studio Code" |
| // the main app file | |
| import express from "express"; | |
| import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
| import authenticate from "./authentication"; // middleware for doing authentication | |
| import permit from "./authorization"; // middleware for checking if user's role is permitted to make request | |
| const app = express(), | |
| api = express.Router(); | |
| // first middleware will setup db connection |