Skip to content

Instantly share code, notes, and snippets.

View kevinSuttle's full-sized avatar

Kevin Suttle kevinSuttle

View GitHub Profile
@kevinSuttle
kevinSuttle / meta-tags.md
Last active March 31, 2024 14:26 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@kevinSuttle
kevinSuttle / app.js
Last active February 26, 2024 07:02
Gulp, BrowserSync, Sass, Autoprefixer, Nodemon
var express = require('express');
var app = express();
var router = express.Router();
var hbs = require('hbs');
app.set('view engine', 'html');
app.engine('html', hbs.__express);
app.use(express.json());
app.use(express.urlencoded());
@kevinSuttle
kevinSuttle / .htaccess
Last active January 27, 2024 14:07
.htaccess for Wordpress
# Use PHP5 as default
AddHandler application/x-httpd-php5 .php
# 5G BLACKLIST/FIREWALL (2013)
# @ http://perishablepress.com/5g-blacklist-2013/
# 5G:[QUERY STRINGS]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
@kevinSuttle
kevinSuttle / touch-icons.html
Last active December 18, 2022 17:15
Touch icon link syntax
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png">
<!-- For the iPad mini and the first- and second-generation iPad on iOS ≤ 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="apple-touch-icon-72x72-precomposed.png">
<!-- For the iPad mini and the first- and second-generation iPad on iOS ≥ 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="apple-touch-icon-76x76-precomposed.png">
<!-- For iPhone with high-resolution Retina display running iOS ≤ 6: -->
@kevinSuttle
kevinSuttle / VS Code settings.json
Last active September 16, 2022 09:44
Visual Studio Code Settings
{
"editor.fontFamily": "Fira Code",
"editor.fontSize": 14,
"editor.formatOnSave": true,
"editor.renderWhitespace": "all",
"editor.tabSize": 2,
"editor.wordWrap": "on",
"flow.useNPMPackagedFlow": true,
"javascript.format.enable": false,
"javascript.validate.enable": false,
@kevinSuttle
kevinSuttle / getGHiemails.sh
Last active June 17, 2022 12:36
User emails API
❯ curl -H "Authorization: token MY_TOKEN" -H "X-Oauth-Scope: user:email" "https://api.github.com/users/kevinSuttle"
{
"login": "kevinSuttle",
"id": 95672,
"avatar_url": "https://avatars.githubusercontent.com/u/95672?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/kevinSuttle",
"html_url": "https://github.com/kevinSuttle",
"followers_url": "https://api.github.com/users/kevinSuttle/followers",
"following_url": "https://api.github.com/users/kevinSuttle/following{/other_user}",
@kevinSuttle
kevinSuttle / getCookie.js
Created June 18, 2015 05:09
Get cookie value with escaped quotes.
function getCookie(cookieName) {
if (!cookieName) { return null; }
return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(cookieName).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")).replace(/['"]+/g, '') || null;
}
// Original function
// https://developer.mozilla.org/en-US/docs/Web/API/document/cookie#A_little_framework.3A_a_complete_cookies_reader.2Fwriter_with_full_unicode_support
@kevinSuttle
kevinSuttle / webpack.banner.js
Created October 12, 2016 16:50
Webpack auto-injecting banner into each file
const pkg = require('./package.json');
const moment = require('moment');
const localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone
const timeStamp = moment().format('LLLL');
const banner = `
Generated on ${timeStamp} - ${localTimeZone}
Description: ${pkg.description}
Package: ${pkg.name}
Version: v${pkg.version}
Contributors: ${pkg.contributors.map(function(contributor){ return contributor})}
@kevinSuttle
kevinSuttle / Default (OSX).sublime-keymap
Last active October 24, 2020 20:10
Sublime Text 3 settings
[
{ "keys": ["super+shift+r"], "command": "reindent" },
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+k", "super+d"], "command": "toggle_distraction_free" }
]
@kevinSuttle
kevinSuttle / gist:8129940
Created December 26, 2013 04:50
Gmail 'Unsubscribe' Filter
"To be removed from this newsletter" OR "opt-out" OR unsubscribe OR "viewing the newsletter" OR "privacy policy" OR enews OR "edit your preferences" OR "email notifications" OR "update profile" OR smartunsubscribe OR secureunsubscribe OR yahoogroups OR "manage your account" OR "group-digests"