Skip to content

Instantly share code, notes, and snippets.

View cngodles's full-sized avatar

Clint cngodles

View GitHub Profile
@speakerdamage
speakerdamage / channel-changer.lua
Last active March 7, 2019 03:33
grainy 80s tv for norns
-- channel changer
--
-- your tape transmitted thru
-- late-night static and
-- broken antenna frequencies
--
-- KEY3: change channel
-- KEY1 hold: tv guide
-- ENC1: volume
-- ENC2: speed
@cfarm
cfarm / JAWS vs VoiceOver screen readers.md
Last active May 4, 2023 12:51
JAWS vs VoiceOver: What JAWS, VoiceOver and other screen readers have in common and where they differ, plus how this should be considered in the design and development process
@vldvel
vldvel / Notification-check.js
Created March 14, 2018 07:27
Notification check
if (!('Notification' in window)) {
// Place notification logic here
}
@vldvel
vldvel / Notification-request.js
Last active April 14, 2018 02:21
Notification Request API
Notification.requestPermission((permission) => {
switch (permission) {
case 'granted': {
console.log('Now we can send notifications!');
break;
}
case 'denied': {
console.log('User close the request pop-up!')
}
case 'default': {
@searsia
searsia / proxy.php
Created January 6, 2018 08:45
Simple PHP image proxy
<?php
$PROXY = 'https://yourdomain.top/proxy.php?url=';
# This script forwards the call
# Check for url parameter, and prevent file transfer
if (isset($_GET['url']) and preg_match('#^https?://#', $_GET['url']) === 1) {
$url .= $_GET['url'];
} else {
@codediodeio
codediodeio / database.rules.json
Last active November 4, 2024 03:22
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@amboutwe
amboutwe / yoast_seo_canonical_change_woocom_shop.php
Last active July 12, 2024 15:17
Code snippets for the Yoast SEO canonical output
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Change the canonical link for the shop page
* Credit: Scott Weiss of somethumb.com
* Yoast Doc: https://developer.yoast.com/features/seo-tags/canonical-urls/api/
* Last Tested: Jan 25 2017 using Yoast SEO 6.0 on WordPress 4.9.1
*/
add_filter( 'wpseo_canonical', 'yoast_seo_canonical_change_woocom_shop', 10, 1 );
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@Two9A
Two9A / decronym.php
Last active April 9, 2024 23:25
Decronym: A simple Reddit bot
<?php
/**
* Dirty, dirty Reddit bot: Decronym
*/
class Reddit {
const USERNAME = 'Decronym';
const PASSWORD = '***';
const CLIENTID = '***';
const SECRET = '***';
@erichurst
erichurst / US Zip Codes from 2013 Government Data
Created December 9, 2013 23:00
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
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