Skip to content

Instantly share code, notes, and snippets.

@gitfvb
gitfvb / timer.ps1
Created September 4, 2020 14:26
A timer in PowerShell controlled through a "tick" event instead of a start-sleep. Script can be run standalone out of the box.
<#
Good example inspired from here
https://gist.github.com/SteveGilham/98a39f621cfed70bfa0a
To explore possible events, type in
$timer | gm
#>
@jappievw
jappievw / LICENSE
Last active November 5, 2025 16:04
Boto3 Management Session with Refreshable Assume Role
MIT License
Copyright (c) 2018 Jasper van Wanrooy
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:
@bugdone
bugdone / dualsubs.lua
Last active August 4, 2024 13:33
Display ko and en subtitles simultaneously in mpv
function dualsubs()
local i = 0
local tracks_count = mp.get_property_number("track-list/count")
while i < tracks_count do
local track_type = mp.get_property(string.format("track-list/%d/type", i))
local track_lang = mp.get_property(string.format("track-list/%d/lang", i))
local track_id = mp.get_property(string.format("track-list/%d/id", i))
if track_type == "sub" then
if string.match(track_lang, "en") then
@peterforgacs
peterforgacs / Windows10AWSEC2.md
Last active October 27, 2025 08:09
Running Windows 10 on AWS EC2

Running Windows 10 on AWS EC2

Downloading the image

Download the windows image you want.

AWS vmimport supported versions: Microsoft Windows 10 (Professional, Enterprise, Education) (US English) (64-bit only)

So Home wont work.

@CMCDragonkai
CMCDragonkai / regular_expression_engine_comparison.md
Last active November 21, 2025 01:30
Regular Expression Engine Comparison Chart

Regular Expression Engine Comparison Chart

Many different applications claim to support regular expressions. But what does that even mean?

Well there are lots of different regular expression engines, and they all have different feature sets and different time-space efficiencies.

The information here is just copied from: http://regular-expressions.mobi/refflavors.html

@cgoldberg
cgoldberg / timer.py
Created June 16, 2012 23:06
Python Timer Class - Context Manager for Timing Code Blocks
#!/usr/bin/env python
#
# Python Timer Class - Context Manager for Timing Code Blocks
# Corey Goldberg - 2012
#
from timeit import default_timer