Skip to content

Instantly share code, notes, and snippets.

View 1px-transparent-png-base64.txt
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=
View http-auth.php
<?php
/*
Plugin Name: Http Auth
Plugin URI: https://wordpress.org/plugins/http-auth/
Description: This plugin allows you apply HTTP Auth on your site. You can apply Http Authentication all over the site or only the admin pages.
Version: 0.1
Author: Sami Ahmed Siddiqui and Yasir Ahmed Siddiqui
Author URI: http://www.yasglobal.com
Text Domain: http-auth
*/
@groovenectar
groovenectar / .gitignore
Last active Oct 10, 2016 — forked from erfanimani/.gitignore
A refactored and modern .gitignore for Magento. Compatible for Git versions 2.7.0+. See this revision to use it for versions lower than 2.7.0: https://gist.github.com/erfanimani/8856964/886f5d79d229c21b9c712155c362e5fc1c61a12a
View .gitignore
### MAGENTO DIRECTORIES
# Ignore everything in media, except for the htaccess files
# Also include the Lazy Catalog Images (LCI) .htaccess if that's installed
# (https://github.com/AOEpeople/Aoe_LazyCatalogImages)
/media/*
!/media/.htaccess
!/media/customer/.htaccess
!/media/downloadable/.htaccess
!/media/catalog/product/LCI/.htaccess
@groovenectar
groovenectar / windows-permissions-reset.md
Last active Nov 22, 2016
Windows - Resetting folder/file permissions - Generic fix for permission denied errors in Windows Explorer
View windows-permissions-reset.md
@groovenectar
groovenectar / OpenWithSublimeText3.bat
Last active Mar 1, 2017 — forked from roundand/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 7)
View OpenWithSublimeText3.bat
@echo off
SET st3Path=D:\Programs\Sublime Text 3\sublime_text.exe
rem add it for all file types
rem commented because it's already an option during installation
rem @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
rem @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
rem @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
View US Zip Codes from 2016 Census Data
ZIP,LAT,LNG
00601,18.180555,-66.749961
00602,18.361945,-67.175597
00603,18.455183,-67.119887
00606,18.158345,-66.932911
00610,18.295366,-67.125135
00612,18.402253,-66.711397
00616,18.420412,-66.671979
00617,18.445147,-66.559696
00622,17.991245,-67.153993
@groovenectar
groovenectar / knockoutjs-date-binding.js
Created Jun 3, 2021
Date Binding for Knoockout JS
View knockoutjs-date-binding.js
ko.bindingHandlers.date = {
update: function(element, valueAccessor) {
// First get the latest data that we're bound to
let data = valueAccessor();
// Next, whether or not the supplied model property is observable, get its current value
let value = ko.unwrap(data);
let prop = element.nodeName === 'INPUT' ? 'value' : 'innerText';
if (value instanceof Date) {
if (element.type === 'date') {
@groovenectar
groovenectar / knockout-js-datetime-input.js
Last active Aug 20, 2021
A KnockoutJS component to create date/time inputs that work together to update a single observable value. This value gets passed in as a parameter, `datetimeObservable`. This value is updated in realtime on every keypress.
View knockout-js-datetime-input.js
// Usage: <datetime params="id: 'any-unique-id', datetimeObservable: observableDateTimeObjectFromParentViewModel, default: defaultDateObject, min: new Date(), max: maxDateObject"></datetime>
ko.components.register('datetime', {
viewModel: function(params) {
this.dateid = params.id + '-date';
this.timeid = params.id + '-time';
this.date = '';
this.time = '';
this.datetimeObservable = params.datetimeObservable;