Skip to content

Instantly share code, notes, and snippets.

View john-crossley's full-sized avatar
🥔

John Crossley john-crossley

🥔
  • John Crossley
  • Manchester, England
View GitHub Profile
body { background: #222; color: #e6e6e6; }
a { color: #949494; }
a:link, a:visited { color: #949494; }
a:hover, a:active, a:focus { color: #c7c7c7; }
hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; }
PRIVACY POLICY MODEL FOR MOBILE APPLICATIONS
This privacy policy governs your use of the software application VeggieBeers (“Application”) for mobile devices that was created by John Crossley. The Application is a way for people to determine the suitability of a beverage for their diet, for example, people who suffer from a Gluten allergy or are vegetarian or vegan. veggiebeers will aim to provide that information.
What information does the Application obtain and how is it used?
The Application obtains the information you provide when you download and register the Application. Registration with us is optional. However, please keep in mind that you may not be able to use some of the features offered by the Application unless you register with us. When you register with us and use the Application, you generally provide (a) your name, email address, age, user name and password.
We may also use the information you provided us to contact your from time to time to provide you with important information, required
@john-crossley
john-crossley / AsyncOperation.swift
Created May 20, 2018 13:15
AsyncOperation wrapper for OperationQueue
class AsyncOperation: Operation {
enum State: String {
case ready = "Ready"
case executing = "Executing"
case finished = "Finished"
fileprivate var keyPath: String {
return "is" + rawValue
}
}
@john-crossley
john-crossley / package.json
Created May 13, 2018 19:07
Update scripts object inside package.json
"scripts": {
"dev": "NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "NODE_ENV=development webpack-dev-server --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"production": "NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
@john-crossley
john-crossley / add-tailwind-to-laravel-mix.sh
Created May 13, 2018 19:05
Add Tailwind CSS to Laravel Mix
const { mix } = require('laravel-mix');
const tailwindcss = require('tailwindcss');
mix.sass('Resources/src/css/app.scss', 'Public/css/app.css')
.options({
processCssUrls: false,
postCss: [tailwindcss('./tailwind.js')]
});
@john-crossley
john-crossley / app.scss
Created May 13, 2018 19:02
Tailwind CSS preflight
/**
* This injects Tailwind's base styles, which is a combination of
* Normalize.css and some additional base styles.
*
* You can see the styles here:
* https://github.com/tailwindcss/tailwindcss/blob/master/css/preflight.css
*
* If using `postcss-import`, use this import instead:
*
* @import "tailwindcss/preflight";
@john-crossley
john-crossley / create-resources-with-javascript-and-css.sh
Last active May 13, 2018 18:58
Create Resources with JavaScript and SCSS directory
# Run the following inside the root of our awesome Vapor app
mkdir -p Resources/{javascript,scss}
touch Resources/scss/app.scss
@john-crossley
john-crossley / generate-tailwind-config.sh
Created May 13, 2018 18:42
Generate tailwind css Config
./node_modules/.bin/tailwind init
@john-crossley
john-crossley / install-tailwindcss.sh
Created May 13, 2018 18:41
Install tailwind CSS
npm install tailwindcss --save-dev
@john-crossley
john-crossley / copy-mix-file.sh
Created May 13, 2018 17:23
Copy default Laravel Mix file to project
cp node_modules/laravel-mix/setup/webpack.mix.js ./