Skip to content

Instantly share code, notes, and snippets.

@corysimmons
corysimmons / theme-switcher.html
Created July 29, 2017 23:41
Vue theme switcher
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://unpkg.com/reeeset">
<script src="https://unpkg.com/vue"></script>
<style>
body {
padding: 3rem;
font-family: avenir;
-webkit-font-smoothing: antialiased;
@corysimmons
corysimmons / admin.js
Created April 22, 2017 17:02 — forked from itzikbenh/admin.js
Webpack config. Asset files are in assets/src/{js/scss} and they are being compiled to public/{js/css}
import '../scss/admin.scss';
@corysimmons
corysimmons / front-page.php
Last active January 15, 2017 01:05
Prototype idea
<div class="utility_page-center">
<?php
component('slider', [
// $args
'cat' => '4',
'posts_per_page' => '3'
], [
// custom extra context
'wrap_class' => 'orange_bg',
'item_class' => 'slide'
@corysimmons
corysimmons / bookmarklet.js
Last active January 19, 2018 22:12
Download inline <svg>s
javascript:void function()%7B"use strict"%3Bvar e%3D!0,t%3D!1,r%3Dvoid 0%3Btry%7Bfor(var o,a%3Ddocument.querySelectorAll("svg")%5BSymbol.iterator%5D()%3B!(e%3D(o%3Da.next()).done)%3Be%3D!0)%7Bvar i%3Do.value%3Bi.insertAdjacentHTML("beforebegin",%27<a href-lang%3D"image/svg%2Bxml" href%3D"data:image/svg%2Bxml%3Butf8,%27%2Bescape(i.outerHTML)%2B%27" style%3D"position: relative%3B z-index: 999%3B top: -15px%3B right: -15px%3B font-size: 10px%3B background: tomato%3B color: white%3B padding: 5px%3B">Download SVG</a>%27)%7D%7Dcatch(n)%7Bt%3D!0,r%3Dn%7Dfinally%7Btry%7B!e%26%26a%5B"return"%5D%26%26a%5B"return"%5D()%7Dfinally%7Bif(t)throw r%7D%7D%7D()%3B
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains website.org --no-parent www.website.org/tutorials/html/
@corysimmons
corysimmons / style.css.js
Created October 25, 2016 03:31
Webpack bundle of Jeet 7.0.0 PR
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
@corysimmons
corysimmons / headless-chromium-mac.md
Last active March 3, 2020 12:09
Instructions for how to build Headless Chromium on Mac.

Doesn't work yet.

Build

  • brew install ninja
  • mkdir -p ~/chromium
  • cd ~/chromium
  • git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
  • export $PATH=$PWD/depot_tools:$PATH (shell specific)
  • fetch --no-history chromium --nosvn=True
@corysimmons
corysimmons / package.json
Created June 23, 2016 21:07
babel, sass, npm-run-all
{
"devDependencies": {
"babel-cli": "^6.10.1",
"babel-preset-es2015": "^6.9.0",
"babel-preset-stage-0": "^6.5.0",
"node-sass": "^3.8.0",
"npm-run-all": "^2.2.2"
},
"babel": {
"presets": [
@corysimmons
corysimmons / ievms.sh
Last active September 21, 2017 10:02
Skips MD5 check that routinely fails with ievms.
#!/usr/bin/env bash
# Caution is a virtue.
set -o nounset
set -o errtrace
set -o errexit
set -o pipefail
# ## Global Variables