Skip to content

Instantly share code, notes, and snippets.

View entropie's full-sized avatar

Michael Trommer entropie

View GitHub Profile
@clashnewbm3
clashnewbm3 / Code
Created August 26, 2025 11:06
Ruby Hacker Text Animation
print "\e[?25l"
rows, cols = `stty size`.split.map(&:to_i)
drops = Array.new(cols) { rand(rows) }
chars = ("0".."9").to_a + ("A".."Z").to_a + ("a".."z").to_a
loop do
@vejvarm
vejvarm / cuda_12.2_installation_on_Ubuntu_20.04
Last active August 13, 2025 23:26 — forked from MihailCosmin/cuda_11.8_installation_on_Ubuntu_22.04
Instructions for CUDA v12.2 and cuDNN 8.7 installation on Ubuntu 20.04 for PyTorch 2.0.0
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
/*
* Stripe WebGl Gradient Animation
* ScrollObserver functionality to disable animation when not scrolled into view has been disabled and
* commented out for now.
*/
//Converting colors to proper format
function normalizeColor(hexCode) {
@markusressel
markusressel / esphome_hx711_smart_scale.yaml
Last active July 22, 2025 06:17
ESPHome sample configuration for an HX711 powered Smart Scale including Auto-Tare functionality.
Moved to https://github.com/markusressel/ESPHome-Smart-Scale
@staaldraad
staaldraad / awk_netstat.sh
Last active October 3, 2025 13:56
AWK to get details from /proc/net/tcp and /proc/net/udp when netstat and lsof are not available
# Gawk version
# Remote
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($3,index($3,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($3,i,2))}{print x":"strtonum("0x"substr($3,index($3,":")+1,4))}'
# Local
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($2,index($2,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($2,i,2))}{print x":"strtonum("0x"substr($2,index($2,":")+1,4))}'
# No Gawk
# Local
grep -v "rem_address" /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active November 26, 2025 13:00
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@geerlingguy
geerlingguy / dashcam-time-lapse.sh
Last active October 22, 2025 16:13
Create a time lapse video from a set of real-time dash cam clips.
#!/bin/bash
#
# Batch Time-Lapse creation script.
#
# This script can be used to speed up, trim, and finally concatenate tens or
# even hundreds of video clips, e.g. from a dash cam. You can do other things,
# too, but the main things this script does include:
#
# 1. Copy across and speed up video clips from an input dir to an output dir.
# 2. Trim off the first x frames of each of the copied/sped up clips.
@PurpleBooth
PurpleBooth / README-Template.md
Last active November 27, 2025 04:12
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@LMolr
LMolr / gist:50315cd34d78318eab0d
Created January 2, 2015 16:56
Gentoo: switch profile: nomultilib -> multilib
<iamben> LMolr: yeah it's pretty easy. PORTAGE_BINHOST="http://packages.gentooexperimental.org/packages/amd64-stable/" emerge -G1av gcc glibc
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>