Skip to content

Instantly share code, notes, and snippets.

View zfdesign's full-sized avatar

ZFDesign zfdesign

  • ZFDesign
  • London, UK
View GitHub Profile

Setting up Windows for development

  1. GET/SET Windows PowerShell Execution policy Get-ExecutionPolicy. If it returns Restricted, then run Set-ExecutionPolicy AllSigned or Set-ExecutionPolicy Bypass -Scope Process.

  2. Install, PowerShell execute:

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

Setup S3, SSL certificate and CloudFront distribution

https://youtu.be/5uS_rQjQ4Hw

1. Create a bucket

A. Select: Static Website hosting (https://docs.aws.amazon.com/AmazonS3/latest/dev/EnableWebsiteHosting.html)

B. Note the URL at the top of that setting (your-domain.net.s3-website.eu-west-2.amazonaws.com)

@zfdesign
zfdesign / Eyeglass.readme.md
Last active March 20, 2019 11:37
Eyeglass SASS node modules implementation notes
@zfdesign
zfdesign / css_regression_testing.md
Created September 25, 2018 09:51 — forked from cvrebert/css_regression_testing.md
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots
@zfdesign
zfdesign / Shell.Helper.md
Created September 26, 2017 15:09
Shell.Helper

ZFD Help contains useful stuff

Simple Shell commands reference

Create a new directory and cd into it using argument $_

$ mkdir react-app && cd $_

Create new folder js, and new files index.html and js/app.js in js folder

@zfdesign
zfdesign / @ SimpleDB.md
Created October 6, 2016 21:20
Simple DB

SimpleDB - Like Indexed DB, but Simple

A simple asynchronous data store.

STATUS: This is a thought experiment, not a serious proposal. Would basic async storage like this be useful? With this plus some locking primitive, could you build Indexed DB?

Like Indexed DB:

  • rich value types - store anything you can structured clone
  • rich key types - Number, String, Date, Array (of other key types)
@zfdesign
zfdesign / wordsCount.js
Created February 20, 2015 12:49
Count words in a sentence without using "split"
/* Given a string containing a series of words, for example containing a newspaper article,
implement a function to read the string and count the words within it.
You can’t use ‘split’ or similar. */
var sentence = "Given a string containing a series of words, for example containing a newspaper article,";
var wordsCount = function (str) {
var i = 0;
var word = "";
var arr = [];
for (i = 0; i < str.length; i++) {
@zfdesign
zfdesign / gcd.js
Last active August 29, 2015 14:05
Task: write a function called GCD that prints the greatest common divisor of two positive integers (a and b).
/* Task:
// Write a function called GCD
// that prints the greatest common divisor of two positive integers (a and b).
// */
function GCD(a,b) {
'use strict';
var calc = function (a,b) {
return (a % b === 0) ? b : null;
},