Skip to content

Instantly share code, notes, and snippets.

View freq32's full-sized avatar
🎯
Focusing

freq32

🎯
Focusing
View GitHub Profile
@freq32
freq32 / .htaccess
Created October 30, 2019 11:15 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
<link rel='stylesheet' id='wp-block-library-css' href='https://spitzrestaurant.com/wp-includes/css/dist/block-library/style.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='wp-block-library-theme-css' href='https://spitzrestaurant.com/wp-includes/css/dist/block-library/theme.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='jquery-ui-theme-css' href='https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='sb-font-awesome-css' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='twentyseventeen-style-css' href='https://spitzrestaurant.com/wp-content/themes/spitz-twentyseventeen/assets/css/twentyseventeen_style.css' type='text/css' media='all' />
<link rel='stylesheet' id='spitz-twentyseventeen-style-css' href='https://spitzrestaurant.com/wp-content/themes/spitz-twentyseventeen/assets/css/them
<link rel='stylesheet' id='wp-block-library-css' href='https://spitzrestaurant.com/wp-includes/css/dist/block-library/style.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='wp-block-library-theme-css' href='https://spitzrestaurant.com/wp-includes/css/dist/block-library/theme.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='jquery-ui-theme-css' href='https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='sb-font-awesome-css' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='twentyseventeen-style-css' href='https://spitzrestaurant.com/wp-content/themes/spitz-twentyseventeen/assets/css/twentyseventeen_style.css' type='text/css' media='all' />
<link rel='stylesheet' id='spitz-twentyseventeen-style-css' href='https://spitzrestaurant.com/wp-content/themes/spitz-twentyseventeen/assets/css/them
<link rel='stylesheet' id='wp-block-library-css' href='https://spitzrestaurant.com/wp-includes/css/dist/block-library/style.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='wp-block-library-theme-css' href='https://spitzrestaurant.com/wp-includes/css/dist/block-library/theme.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='jquery-ui-theme-css' href='https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='sb-font-awesome-css' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='twentyseventeen-style-css' href='https://spitzrestaurant.com/wp-content/themes/spitz-twentyseventeen/assets/css/twentyseventeen_style.css' type='text/css' media='all' />
<link rel='stylesheet' id='spitz-twentyseventeen-style-css' href='https://spitzrestaurant.com/wp-content/themes/spitz-twentyseventeen/assets/css/them
<link rel='stylesheet' id='wp-block-library-css' href='https://spitzrestaurant.com/wp-includes/css/dist/block-library/style.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='wp-block-library-theme-css' href='https://spitzrestaurant.com/wp-includes/css/dist/block-library/theme.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='jquery-ui-theme-css' href='https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='sb-font-awesome-css' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='twentyseventeen-style-css' href='https://spitzrestaurant.com/wp-content/themes/spitz-twentyseventeen/assets/css/twentyseventeen_style.css' type='text/css' media='all' />
<link rel='stylesheet' id='spitz-twentyseventeen-style-css' href='https://spitzrestaurant.com/wp-content/themes/spitz-twentyseventeen/assets/css/them
@freq32
freq32 / pubsub.js
Last active September 3, 2015 03:47 — forked from learncodeacademy/pubsub.js
Basic Javascript PubSub Pattern
//events - a super-basic Javascript (publish subscribe) pattern
var events = {
events: {},
on: function (eventName, fn) {
this.events[eventName] = this.events[eventName] || [];
this.events[eventName].push(fn);
},
off: function(eventName, fn) {
if (this.events[eventName]) {