Skip to content

Instantly share code, notes, and snippets.

View dterracino's full-sized avatar
🐢
I may be slow to respond…

David Terracino dterracino

🐢
I may be slow to respond…
View GitHub Profile
@dterracino
dterracino / SteamFineDiscounts.js
Created April 8, 2021 02:56 — forked from burdiuz/SteamFineDiscounts.js
user-scripts for Steam Store
/* Filters items on Steam Store search page to display only fine discounted.
Steam Sale fine discounts
1. Open [Steam Search page](http://store.steampowered.com/search/?sort_by=Price_ASC&specials=1)
2. Check to be logged in, script will hide owned games
3. Open Browser console with Ctrl+Shift+I for Chrome(Console tab), Ctrl+Shift+K for Firefox, F12 for IE.
4. Paste code from [search-userscript.js](https://raw.githubusercontent.com/burdiuz/js-steam-fine-discounts/master/search-userscript.js) into console and press Enter
5. Wait for fine discounts to be found and displayed
*/
(function() {
var categories = '998,994,21,996,997'; // 998 - games
@dterracino
dterracino / Pattern.js
Created March 3, 2021 01:13 — forked from jxnblk/Pattern.js
generative svg pattern
import React from 'react'
// Generative SVG patterns
const rand = (max = 128, min = 0) => Math.floor(Math.random() * (max - min) + min)
const diamond = [
4, 0,
8, 4,
4, 8,
0, 4
.grid {
float: left;
width: 100%;
}
@media screen and (min-width: 512px) and (max-width: 895px) {
.grid { width: 50%; }
.grid:nth-child(2n+1) { clear: left; }
}
@media screen and (min-width: 896px) and (max-width: 1279px) {
@dterracino
dterracino / epapercmd.cpp
Created February 14, 2021 06:00 — forked from JoshData/epapercmd.cpp
Waveshare e-paper driver tool
/*
* A Waveshare E-Paper controller via a simple web API
*
* This C++ program creates a simple HTTP server to control a Waveshare
* e-Paper display, like the 10.3inch e-Paper e-Ink Display HAT For
* Raspberry Pi at https://www.waveshare.com/10.3inch-e-Paper-HAT.htm
* which I am using. This program is meant to be run on the Pi that is
* connected to the e-Paper display.
*
* When run, this program creates a simple web server that serves a
@dterracino
dterracino / zipcode_database.py
Created February 14, 2021 05:57 — forked from JoshData/zipcode_database.py
Severless ZIP code database
# Pull ZIP code latitude/longitude coordinates from Geonames.org
# and write them out to a sharded flat-file database that makes
# it easy to efficiently query the database from the browser without
# any backend server. The Geonames database has a CC-BY license so
# credit must be given in the application.
#
# There are about 41,000 ZIP codes in the database, and with their
# lat/lng coordinate it's about 1MB of data, which a browser could
# load but it's kind of a lot of data for a browser to download and
# process. With state and place names, which might make for a nicer
@dterracino
dterracino / LINQ.psd1
Created January 20, 2021 06:24 — forked from josheinstein/LINQ.psd1
LINQ-ish Cmdlets for PowerShell
@{
# MODULE
Description = 'LINQ for PowerShell'
ModuleVersion = '3.0'
GUID = '03BDA80F-0831-406E-B6AE-59E32D73F190'
# AUTHOR
Author = 'Josh Einstein'
CompanyName = 'Einstein Technologies'
@dterracino
dterracino / gist:fe04ff4373efe0e1b2be0479fda076a2
Created December 20, 2020 23:11 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@dterracino
dterracino / middleware.cs
Created December 20, 2020 23:10 — forked from dbones/middleware.cs
middleware class, which functions like the middleware you will find in .NET Core, Express (on node.js)
namespace MiddleWare.Host
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading.Tasks;
using Autofac;
internal class Program
{
@dterracino
dterracino / StreamCopy.cs
Created December 20, 2020 23:09 — forked from dbones/StreamCopy.cs
StreamCopy - Copy the contents from one stream to another, it also implements the INPC to allow updating of the UI of number of bytes copied and also the bytes per second (minimal testing applied)
public class StreamCopy : INotifyPropertyChanged
{
private readonly Stream _source;
private readonly Stream _destination;
private readonly int _bufferSize;
private readonly TransferStatus _transferStatus;
private long _numberOfBytesCopied;
internal StreamCopy(Stream source, Stream destination, int bufferSize = 1024)
{
@dterracino
dterracino / TapExtension.cs
Created December 10, 2020 05:54 — forked from davecowart/TapExtension.cs
C# implementation of Ruby's tap method
public static class TapExtension {
public static T Tap<T>(this T obj, Action<T> block) {
block.Invoke(obj);
return obj;
}
}