Skip to content

Instantly share code, notes, and snippets.

View MarketingPip's full-sized avatar
🚬
🌳

Jared Van Valkengoed MarketingPip

🚬
🌳
View GitHub Profile
@mconlon17
mconlon17 / languages.sparql
Created April 21, 2020 17:16
Wikidata list of languages with ISO 639 codes
# List of languages with their ISO 639 codes
SELECT DISTINCT ?language ?name ?iso1 ?iso2 ?iso3
WHERE
{
?language wdt:P31 wd:Q34770 .
?language rdfs:label ?name .
FILTER(lang(?name) = "en")
OPTIONAL {?language wdt:P218 ?iso1 .}
OPTIONAL {?language wdt:P219 ?iso2 .}
?language wdt:P220 ?iso3 .
@raghav4
raghav4 / Ansicolor.md
Created February 8, 2020 07:17
Color codes for console using Ansi
@philcampbell-qhr
philcampbell-qhr / cities.txt
Created January 8, 2020 22:51
list of cities/towns in Canada
100 Mile House, British Columbia
108 Mile House, British Columbia
108 Mile Ranch, British Columbia
150 Mile House, British Columbia
Abbey, Saskatchewan
Abbotsford, British Columbia
Aberarder, Ontario
Abercorn, Quebec
Aberdeen, Saskatchewan
Abernethy, Saskatchewan
@nicolasdao
nicolasdao / command_output_piped_to_node.js
Last active August 26, 2024 05:56
Nifty trick to pipe any command into a JS program for further processing. Keywords: js piping pipe nodejs node command
// In your package.json, add a script similar to this:
// "scripts": {
// "pipe": "ls | node ingestOutput"
// }
let data=''
const printInfo = msg => console.log(`\x1b[1m\x1b[36mi ${msg}\x1b[0m`)
const printError = msg => console.log(`\x1b[1m\x1b[31mx ${msg}\x1b[0m`)
@pragex
pragex / Canada Postal Code.py
Last active August 8, 2023 20:50
Find the Canada province code by address postal code.
import re
import sys
def province_by_postal_code(postal_code):
pc = postal_code.replace(" ", "").replace("-", "").upper()
if not re.match(r"^([ABCEGHJKLMNPRSTVXY]\d)"
r"([ABCEGHJKLMNPRSTVWXYZ]\d){2}$", pc):
return "<INVALID>" # Invalid, 6 characters required
@florabtw
florabtw / soundoftext.py
Created September 28, 2019 20:31
Using Sound of Text API in Python 3
import time
import requests
data = { 'engine': 'Google', 'data': { 'voice': 'en-US', 'text': 'Hello, world!' } }
response = requests.post(
'https://api.soundoftext.com/sounds',
headers={'Content-Type':'application/json'},
json=data
)
@nevillepark
nevillepark / README.md
Last active July 18, 2025 11:43
CBC radio stream URLs

CBC Radio Stream URLs

Using these URLs, you can listen to CBC radio streams with applications like VLC or Transistor. The files are M3U playlists, so you can use them as-is, edit them to suit your tastes, or use individual URLs.

This playlist contains the .m3u8 URLs from the CBC Listen website, which uses the HLS (HTTP Live Streaming) protocol. The audio stream is broken up into multiple tiny files, which are then fed into the .m3u8 playlist file that delivers them to your computer in the right order. This should work with modern media players.

This legacy playlist uses good old-fashioned MP3 streams found on PublicRadioFan.com. It will work with older programs like Winamp that don't support HLS. I don't know how lo

@sruf
sruf / Country lookup by country code
Last active July 17, 2024 13:27
Country lookup by country code
=IF(ISNA(VLOOKUP(LEFT(A1,8),'Country codes'!A:B,2,FALSE)),
IF(ISNA(VLOOKUP(LEFT(A1,7),'Country codes'!A:B,2,FALSE)),
IF(ISNA(VLOOKUP(LEFT(A1,6),'Country codes'!A:B,2,FALSE)),
IF(ISNA(VLOOKUP(LEFT(A1,5),'Country codes'!A:B,2,FALSE)),
IF(ISNA(VLOOKUP(LEFT(A1,4),'Country codes'!A:B,2,FALSE)),
IF(ISNA(VLOOKUP(LEFT(A1,3),'Country codes'!A:B,2,FALSE)),
IF(ISNA(VLOOKUP(LEFT(A1,2),'Country codes'!A:B,2,FALSE)),,
VLOOKUP(LEFT(A1,2),'Country codes'!A:B,2,FALSE)),
VLOOKUP(LEFT(A1,3),'Country codes'!A:B,2,FALSE)),
VLOOKUP(LEFT(A1,4),'Country codes'!A:B,2,FALSE)),
Smith,
Johnson,
Williams,
Brown,
Jones,
Garcia,
Miller,
Davis,
Rodriguez,
Martinez,
@mojoaxel
mojoaxel / README.md
Last active November 28, 2023 02:45 — forked from c-kick/hnl.mobileConsole.js
hnl.mobileConsole.js - extends JavaScript's console to display a visual console inside the webpage. Very usefull for debugging JS on mobile devices with no real console. Info and demo: http://www.hnldesign.nl/work/code/mobileconsole-javascript-console-for-mobile-devices/

MobileConsole - Javascript console for mobile devices

When developing in JavaScript, I always get a little annoyed about the lack of a debug console on iOS. And when I say ‘lack’ I mean the complete ass backwards obfuscation introduced in iOS 6, requiring you to physically hook your iPhone to your (Mac only!) development computer to view debug output. This approach, including various remote debuggers that are out there, is much too tedious when you simply need to view a value, see the contents of an object or – more likely – see the error message(s) your script caused, indicating why it isn’t working in the first place.

To that goal, I have developed mobileConsole; a JavaScript console for mobile devices. It ‘extends’ the window.console to a visual, HTML-based console that shows you a console similar in appearance to Chrome’s excellent web inspector console. The main goal was to keep mobileConsole unobtrusive: not requiring any additional code. This is why I extended window.console so I could keep usi