Skip to content

Instantly share code, notes, and snippets.

View Tusko's full-sized avatar

Tusko Trush Tusko

View GitHub Profile
{
"name": "load-google-maps",
"version": "1.0.0",
"authors": ["Glenn Baker", "Gavin Foley", "Matteo Gaggiano"],
"description": "Load Google Maps API using jQuery Deferred.",
"main": "load-google-maps.js",
"keywords": ["Google Maps", "Async"],
"license": ["MIT", "GPL"],
"dependencies": {
"jquery": ">=1.5"
@tomysmile
tomysmile / mac-php-composer-setup.md
Created July 11, 2016 10:45
Setup PHP Composer using Brew
@QWp6t
QWp6t / wc-checkout-fields-optgroup.php
Created June 30, 2016 00:51
Add optgroup support to WooCommerce select form fields
<?php
/**
* Plugin Name: Add optgroup support to WooCommerce select form fields
* Description: Converts <code>Group: Option</code> syntax in WooCommerce select form fields into <code>&lt;optgroup...&gt;&lt;option...&gt;</code>
* Author: QWp6t
* Author URI: https://qwp6t.me/
*/
/** NOTE: This shit was quickly hacked together. Worked for me. YMMV. */
@eyecatchup
eyecatchup / hosts
Last active July 12, 2023 08:53
Disable Skype ads: 1.) Add hosts to your hosts file 2.) Flush DNS resolver cache (ipconfig /flushdns)
# Block Skype ads
127.0.0.1 *.msads.net
127.0.0.1 *.msecn.net
127.0.0.1 *.rad.msn.com
127.0.0.1 a.ads2.msads.net
127.0.0.1 ac3.msn.com
127.0.0.1 ad.doubleclick.net
127.0.0.1 adnexus.net
127.0.0.1 adnxs.com
127.0.0.1 ads1.msn.com
@engelfrost
engelfrost / LICENSE
Last active September 2, 2020 11:15
Fake localStorage. Useful for Safari Private Browsing and browsers that don't implement localStorage.
The MIT License (MIT)
Copyright (c) 2015 Textalk
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@armno
armno / .htaccess
Created February 15, 2013 09:35
Allowing Access-Control-Allow-Origin to multiple domains for Ajax requests
# source: http://www.lowest-common-denominator.com/2010/01/http_access_control_to_multipl.php
# - replace `domain1.com` and `domain2.com`
# - add more domains by separating each domain with a pipe `|`
# - escape dot `.` with a backslash
<IfModule mod_headers.c>
SetEnvIf Origin "^http(s)?://(.+\.)?(domain1\.com|domain2\.com)$" origin_is=$0
Header always set Access-Control-Allow-Origin %{origin_is}e env=origin_is
</IfModule>