Skip to content

Instantly share code, notes, and snippets.

View zellwk's full-sized avatar

Zell Liew zellwk

View GitHub Profile
@zellwk
zellwk / deploy.yml
Created August 2, 2023 03:58
Github Actions
# See https://zellwk.com/blog/github-actions-deploy/ an explanation of this code
name: deploy
on:
push:
branches:
- main
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
@zellwk
zellwk / .block
Created January 26, 2018 06:04
Film Flowers Petal Starter Code
license: gpl-3.0
const express = require('express')
const bodyParser = require('body-parser')
const expressValidator = require('express-validator')
const routes = require('./routes')
const middlewares = require('./middlewares')
const errorHandlers = require('./middlewares/errorHandlers')
const isProduction = process.env.NODE_ENV === 'production'
const passport = require('passport')
const app = express()
// Masonry Layout
let grid = document.querySelector('.l-paintings-grid')
let paintingsGrid
if (grid) {
imagesLoaded(grid, () => {
paintingsGrid = new Masonry(grid, {
itemSelector: '.l-painting'
})
})
}
## Redirects I hope to achieve:
- http://zell-weekeat.com/ -> http://zellwk.com/
- http://zell-weekeat.com/about -> http://zellwk.com/about
- http://zell-weekeat.com/about/ -> http://zellwk.com/about
- http://zell-weekeat.com/wp-admin/* -> http://zell-weekeat.com/wp-admin/*
- http://zell-weekeat.com/wp-content/* -> http://zell-weekeat.com/wp-content/*
- http://zell-weekeat.com/* -> http://zellwk.com/blog/*
@zellwk
zellwk / gulpfile.js
Last active December 30, 2020 20:22
Gulpfile-deployment-phase
var gulp = require('gulp');
var sass = require('gulp-sass');
var plumber = require('gulp-plumber');
var notify = require('gulp-notify');
var browserSync = require('browser-sync');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
var spritesmith = require('gulp.spritesmith');
var gulpIf = require('gulp-if');
var nunjucksRender = require('gulp-nunjucks-render');
@zellwk
zellwk / gulpfile.js
Last active January 4, 2017 15:48
Gulpfile-optimization-phase
var gulp = require('gulp');
var sass = require('gulp-sass');
var plumber = require('gulp-plumber');
var notify = require('gulp-notify');
var browserSync = require('browser-sync');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
var spritesmith = require('gulp.spritesmith');
var gulpIf = require('gulp-if');
var nunjucksRender = require('gulp-nunjucks-render');
@zellwk
zellwk / gulpfile.js
Last active April 23, 2016 15:42
Gulpfile-integration-phase
var gulp = require('gulp');
var sass = require('gulp-sass');
var plumber = require('gulp-plumber');
var notify = require('gulp-notify');
var browserSync = require('browser-sync');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
var spritesmith = require('gulp.spritesmith');
var gulpIf = require('gulp-if');
var nunjucksRender = require('gulp-nunjucks-render');
@zellwk
zellwk / gulpfile.js
Last active August 20, 2017 03:34
Gulpfile-testing-phase
var gulp = require('gulp');
var sass = require('gulp-sass');
var plumber = require('gulp-plumber');
var notify = require('gulp-notify');
var browserSync = require('browser-sync');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
var spritesmith = require('gulp.spritesmith');
var gulpIf = require('gulp-if');
var nunjucksRender = require('gulp-nunjucks-render');
@zellwk
zellwk / gulpfile.js
Last active February 3, 2019 21:57
Gulpfile-development-phase
var gulp = require('gulp');
var sass = require('gulp-sass');
var plumber = require('gulp-plumber');
var notify = require('gulp-notify');
var browserSync = require('browser-sync');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
var spritesmith = require('gulp.spritesmith');
var gulpIf = require('gulp-if');
var nunjucksRender = require('gulp-nunjucks-render');