Skip to content

Instantly share code, notes, and snippets.

View isokosan's full-sized avatar
🦚

Deniz Genctürk isokosan

🦚
View GitHub Profile
@ashleykleynhans
ashleykleynhans / README.md
Last active September 25, 2024 08:36 — forked from dlage/README.md
Namecheap DNS to zone file
@t1mwillis
t1mwillis / purgeUnusedCss.js
Last active February 6, 2023 00:03
Vuetify Helper Class Finder
/**
* Scan through all vue components and search for helper styles that are used
* Then return those that aren't so that they can be purged
*/
const { readFileSync } = require('fs')
const { sync } = require('glob')
// Vuetify exists in both pages, components and layouts
const everyVueComponent = sync('./+(components|pages|layouts)/**/*.vue')
@sbuzonas
sbuzonas / nginx-cors.conf
Created September 8, 2015 15:36
Nginx CORS maps
map $http_origin $allow_origin {
default "";
"~^https?://(?:[^/]*\.)?(stevebuzonas\.(?:com|local))(?::[0-9]+)?$" "$http_origin";
}
map $request_method $cors_method {
default "allowed";
"OPTIONS" "preflight";
}
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@mathewbyrne
mathewbyrne / slugify.js
Created October 12, 2011 04:34
Javascript Slugify
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}