Skip to content

Instantly share code, notes, and snippets.

View miguno's full-sized avatar

miguno miguno

  • Europe
  • 13:24 (UTC +02:00)
  • X @miguno
View GitHub Profile
@miguno
miguno / just_windows.md
Last active September 18, 2023 13:07
Setup for `just` on Windows 11: PowerShell aliases

To create an alias for just named j in Powershell that sets just's default shell to PowerShell itself, create a PowerShell profile with the following contents.

###
### PowerShell profile
### 
### Installation
### ============
### Store this file at `$HOME\Documents\PowerShell\Profile.ps1`,
@miguno
miguno / _installing_cs2_text_mod.md
Created September 4, 2023 22:37 — forked from xPaw/README.md
Counter-Strike 2 Text Mod

Installing text mod

  1. Click this link to download the file (Ctrl+S)
  2. Name this file csgo_textmod.txt and put it inside this folder: Steam\SteamApps\Common\Counter-Strike Global Offensive\game\csgo\resource
    • Notice the game\csgo (CS2) folder, and not just csgo (CS:GO).
  3. Add -language textmod to your launch options

Not working? Make sure that:

  • csgo_textmod.txt is placed in the right folder (it needs to be inside the CS2 game\csgo\resource folder)
  • Launch option is spelled correctly, this is an example that will work: -novid -language textmod
@miguno
miguno / README.md
Last active January 10, 2023 16:43 — forked from peterbartha/README.md
Convert Rust books to EPUB (incl. The Rust Programming Language)

Convert Rust books to EPUB (incl. The Rust Programming Language)

The following steps work for all the HTML learning materials on the Learn Rust page:

  1. Click on the "Print this book" icon in the top right corner.
  2. "Cancel" print popup.
  3. Press F12 (on Firefox) to open the browser console. Or: Tools > Browser Tools > Web Developer Tools, then switch to Console tab.
  4. Copy, paste, and run the contents of ebookFormatPreparation.js into your browser's console.
  5. Save the modified HTML file.
@miguno
miguno / detectStdin.go
Last active March 26, 2022 21:40
Detect whether golang application is reading input from STDIN
func isInputFromStdin() bool {
info, err := os.Stdin.Stat()
if err != nil {
log.Fatal(err)
}
if info.Mode()&os.ModeNamedPipe == 0 {
return false
} else {
return true
}
physics/shield/bullet_hit_shield_07.wav
physics/shield/bullet_hit_shield_06.wav
physics/shield/bullet_hit_shield_05.wav
physics/shield/bullet_hit_shield_04.wav
physics/shield/bullet_hit_shield_03.wav
physics/shield/bullet_hit_shield_02.wav
physics/shield/bullet_hit_shield_01.wav
player/winter/snowball_throw_04.wav
player/winter/snowball_throw_03.wav
player/winter/snowball_throw_02.wav
@miguno
miguno / copartitioning.sql
Last active November 28, 2019 14:45
ksqlDB example: creates a new stream with changed number of partitions and a new field as event key (so that its data can be correctly co-partitioned for joining)
CREATE STREAM products ...;
CREATE STREAM products_repartitioned
WITH (PARTITIONS=42) AS
SELECT * FROM products
PARTITION BY product_id
EMIT CHANGES;
@miguno
miguno / increased-partitions.sql
Last active January 11, 2020 00:14
ksqlDB example: Create a new stream with the desired number of partitions.
CREATE STREAM products ...;
CREATE STREAM products_repartitioned
WITH (PARTITIONS=30) AS
SELECT * FROM products
EMIT CHANGES;
@miguno
miguno / topic-as-table.java
Last active January 9, 2020 07:56
Kafka Streams Example: read topic as table
// Create KTable from Kafka topic.
KTable<String, String> table = builder.table("input-topic", Consumed.with(Serdes.String(), Serdes.String()));
@miguno
miguno / topic-as-table.sql
Last active January 9, 2020 07:56
ksqlDB example: read topic as table
-- Create ksqlDB table from Kafka topic.
CREATE TABLE myTable (username VARCHAR, location VARCHAR)
WITH (KAFKA_TOPIC='input-topic', KEY='username', VALUE_FORMAT='...');
@miguno
miguno / topic-as-stream.sql
Last active January 9, 2020 07:37
ksqlDB example: read topic as stream
-- Create ksqlDB stream from Kafka topic.
CREATE STREAM myStream (username VARCHAR, location VARCHAR)
WITH (KAFKA_TOPIC='input-topic', VALUE_FORMAT='...');