Skip to content

Instantly share code, notes, and snippets.

View ch1c0t's full-sized avatar

Anatoly Chernov ch1c0t

View GitHub Profile
@interfect
interfect / castanet.sh
Last active December 14, 2025 07:21
Set up a Chromecast from a Linux PC, without an Android or iOS mobile device and without Google Home
#!/usr/bin/env bash
# castanet.sh: Script to connect a chromecast to a WiFi network.
#
# Allows you to put your Chromecast on WiFi and do Chromecast initial setup
# without using the Google Home app at all, just using a normal Linux computer.
#
# You do need your Chromecast to be on Ethernet, or (untested) to join its setup WiFi
# network with your PC, and you also need to find out its IP yourself with e.g.
# Wireshark.
@diegorodrigo90
diegorodrigo90 / garmin-express-wine.md
Last active December 10, 2025 21:46
Installing garmin express in linux with wine

First we start by creating a wineprefix and installing our prerequisites from terminal:

WINEARCH=win32 WINEPREFIX=/home/$USER/GarminExpress winetricks dotnet452 vcrun2010 corefonts
WINEARCH=win32 WINEPREFIX=/home/$USER/GarminExpress winetricks win7
@szkrd
szkrd / xiaomi-redmi-4x-unlock.md
Created August 10, 2021 16:32
Xiaomi Redmi 4x unlock, lineage install and root

Unlock Xiaomi Redmi 4X (santoni) and install Lineage OS via sideloading

So far the most useful documentation was at Lineage's Redmi section, random "mobile enthusiast" sites were "not very good" and youtube videos are to be avoided like the plague.

Files needed

  • SDK platform tools from android.com
  • mi flash unlock gui tool (miflash_unlock-en-5.5.224.24.zip)
  • newest twrp for device (twrp-3.5.2_9-0-santoni.img), from twrp site
@vi
vi / interesting_crates.md
Last active November 7, 2025 12:53
List of crates that improves or experiments with Rust, but may be hard to find

Let's list here crates that enhance Rust as a language.

It not "batteries" like in stdx, but Rust-specific crates for workarounds for various missing features and experimental ideals from non-accepted/postponed RFCs, or just hacky tricks.

The list is supposed to contain (mostly) crates that are internal to Rust, not ones for making Rust deal with "external world" like other languages bindings, file formats, protocols and so on.

Primary focus should be on crates that are not easy to find by conventional means (e.g. no algorithm name, format or protocol to search for).

Note that quality of the listed crates may vary from proof-of-concept to stable-and-widely-used.

@0xabad1dea
0xabad1dea / copilot-risk-assessment.md
Last active June 26, 2025 22:23
Risk Assessment of GitHub Copilot

Risk Assessment of GitHub Copilot

0xabad1dea, July 2021

this is a rough draft and may be updated with more examples

GitHub was kind enough to grant me swift access to the Copilot test phase despite me @'ing them several hundred times about ICE. I would like to examine it not in terms of productivity, but security. How risky is it to allow an AI to write some or all of your code?

Ultimately, a human being must take responsibility for every line of code that is committed. AI should not be used for "responsibility washing." However, Copilot is a tool, and workers need their tools to be reliable. A carpenter doesn't have to

@emmanuelrosa
emmanuelrosa / pomodoro.sh
Created April 7, 2021 22:47
A custom rofi mode which provides 20 and 5 minute timers.
#! /run/current-system/sw/bin/env bash
# POMODORO: A custom rofi mode which provides 20 and 5 minute timers.
# USAGE: rofi -combi-modi window,drun,pomo -show combi -modi combi,pomo:$HOME/bin/pomodoro
OPT_START_TASK="20 minute timer"
OPT_START_BREAK="5 minute timer"
SLEEP_TASK=1200
SLEEP_BREAK=300
@wKich
wKich / material-ui-dependents.json
Created March 23, 2021 08:57
Material-UI Dependents
This file has been truncated, but you can view the full file.
[
["mui-org/material-ui", 65985],
["pixijs/pixi.js", 32186],
["preactjs/preact", 28520],
["dkhamsing/open-source-ios-apps", 26717],
["formium/formik", 26609],
["hasura/graphql-engine", 20948],
["SeleniumHQ/selenium", 20316],
["mongodb/mongo", 19440],
["react-hook-form/react-hook-form", 19154],
@WesleyAC
WesleyAC / build.sh
Last active June 1, 2025 09:19
Simple rust build and deploy script — https://blog.wesleyac.com/posts/simple-deploy-script
#!/usr/bin/env bash
cd $(dirname $0)
docker run --rm -it -v "$(pwd)":/home/rust/src -v cargo-git:/home/rust/.cargo/git -v cargo-registry:/home/rust/.cargo/registry -v "$(pwd)/target/":/home/rust/src/target ekidd/rust-musl-builder:nightly-2021-01-01 sudo chown -R rust:rust /home/rust/.cargo/git /home/rust/.cargo/registry /home/rust/src/target
docker run --rm -it -v "$(pwd)":/home/rust/src -v cargo-git:/home/rust/.cargo/git -v cargo-registry:/home/rust/.cargo/registry -v "$(pwd)/target/":/home/rust/src/target ekidd/rust-musl-builder:nightly-2021-01-01 cargo build --release

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}