Skip to content

Instantly share code, notes, and snippets.

View wlkns's full-sized avatar

JW wlkns

View GitHub Profile
@wlkns
wlkns / mixins.jade
Last active August 29, 2015 14:07 — forked from shaneriley/mixins.jade
// Writing JS for everything is great and all, but I don't want to see JS
// inline in my Jade templates. Thankfully, there are ways of abstrating it
// into mixins!
// Want some Rails-like helpers?
mixin link_to(name, href)
- href = href || "#"
a(href="#{href}")= name
// How about a single editing point for a class name?
@wlkns
wlkns / gulpfile.babel.js
Created March 2, 2018 10:51 — forked from nicekiwi/gulpfile.babel.js
New ES6 project with Babel, Browserify & Gulp + Bundling/Watching Multiple Files
import gulp from 'gulp';
import sourcemaps from 'gulp-sourcemaps';
import buffer from 'gulp-buffer';
import uglify from 'gulp-uglify';
import tap from 'gulp-tap';
import browserify from 'browserify';
import babel from 'babelify';
gulp.task('build', () => {
@wlkns
wlkns / utils.ts
Created September 22, 2022 08:51 — forked from erikvullings/utils.ts
Utility functions
/* A list of useful functions snippets */
/**
* Create a GUID
* @see https://stackoverflow.com/a/2117523/319711
*
* @returns RFC4122 version 4 compliant GUID
*/
export const uuid4 = () => {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
@wlkns
wlkns / nginx-wordpress.conf
Created September 16, 2023 10:52 — forked from nfsarmento/nginx-wordpress.conf
Harden wordpress security nginx
############ WordPress ####################
# Disable logging for favicon and robots.txt
location = /favicon.ico {
try_files /favicon.ico @empty;
access_log off;
log_not_found off;
expires max;
}