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…
  • Disabled
  • Middletown, NY
  • 10:30 (UTC -04:00)
View GitHub Profile
@blha303
blha303 / get_jackbox_room_code.py
Created November 25, 2016 23:35
Jackbox room code sniffer
# a function to listen for the current jackbox room id being received
# requirements: pyshark python module, tshark library or wireshark
# sometimes the code gets cut off between packets. need to restart the current game if no code is found; this happens 10% of the time
def get_jackbox_room_code(packet_count=None):
""" blocks until room code is found or packet_count is reached
>>> get_jackbox_room_code()
'CTLE' """
def get_outgoing_ip():
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
@martinbuberl
martinbuberl / git-import-repository.md
Last active May 28, 2025 21:05
Import an Existing Git Repository into Another

Import an Existing Git Repository into Another

Before: Folder Structure (Two Separate Repositories)

XXX
 |- .git
 |- (project files)
YYY
 |- .git
@burdiuz
burdiuz / SteamFineDiscounts.js
Last active August 21, 2023 09:06
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
@migueldeicaza
migueldeicaza / gist:8de4f89b182588927ba16f31b214e35a
Created September 25, 2016 14:17
Minimal HoloLens app with UrhoSharp.
using System;
using Windows.ApplicationModel.Core;
using Urho;
using Urho.Holographics;
using Urho.HoloLens;
internal class Program
{
[MTAThread]
private static void Main()
@onli
onli / izulu
Created September 5, 2016 11:02
izulu 1.1
#!/bin/bash
# izulu - Change the wallpaper according to the weather
#
# Copyright (C) 2009 Malte Paskuda
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
public static IEnumerable<string> GetPermutations(string s)
{
if (s.Count() > 1)
return from ch in s
from permutation in GetPermutations(s.Remove(s.IndexOf(ch), 1))
select string.Format("{0}{1}", ch, permutation);
else
return new string[] { s };
}
public static List<string> Permutations(string s)
{
if (s.Length == 1)
{
return new List<string> { s };
}
List<string> permutations = new List<string>();
foreach (char c in s)
@skochinsky
skochinsky / guids.txt
Created July 4, 2016 16:27
UEFI file/section GUIDs collection
; AMI
[GUID_FILE]
; ACPI tables
16D0A23E-C09C-407d-A14A-AD058FDD0CA1=ACPI
11D8AC35-FB8A-44d1-8D09-0B5606D321B9=DSDT
95DFCAE5-BB28-4d6b-B1E2-3AF3A6BF434F=PTID
FB045DB2-598E-485A-BA30-5D7B1B1BD54D=AOAC
60AC3A8F-4D66-4CD4-895A-C3F06E6665EE=iFfsAcpiTables
5B232086-350A-42c7-A70E-3497B5765D85=OEMSSDT
299141BB-211A-48a5-92C0-6F9A0A3A006E=PPMACPI
@grimmdev
grimmdev / ShortGUID.cs
Last active April 15, 2017 09:21
32 bits of goodness.
using System;
public class ShortGUID
{
private static Guid tmpGuid;
public static string NewGuid()
{
tmpGuid = Guid.NewGuid ();
return Convert.ToBase64String(tmpGuid.ToByteArray());