Skip to content

Instantly share code, notes, and snippets.

View SamantazFox's full-sized avatar

Samantaz Fox SamantazFox

View GitHub Profile
@SamantazFox
SamantazFox / ansible-light.cr
Last active March 13, 2023 21:35
Extremely lightweight ansible-compatible implementation which allows semi-automatic deployment of config files on a remote server
# Lightweight Ansible-compatible parser
#
# This tool generates one shell file per playbook placed in the ./ansible folder
# Only partial support for the `copy` and `file` builtins is implemented.
#
# Note: `become` is not supported, so all generated files MUST be run as root.
#
# To execute, run `crystal run ansible-light.cr` in your terminal or use the shell file
# provided below (requires the Crystal compiler).
#
@SamantazFox
SamantazFox / crystal.nanorc
Last active November 30, 2022 21:47
Crystal syntax highlighting for the nano editor
## Syntax highlighting for Crystal.
syntax crystal "\.cr$"
comment "#"
tabgives " "
# Constants.
color brightblue "\<[A-Z]+[0-9A-Z_a-z]*|(\$|@|@@)[0-9A-Z_a-z]+"
@SamantazFox
SamantazFox / client_context.json
Last active August 29, 2022 09:02
Reversing of youtube client context's names
{
"1:0:embedded": { // client
"1:0:embedded": { // context
"1:string": "fr", // hl
"2:string": "FR", // gl
// 4? "remoteHost": "141.98.6.54",
"10:string": "FR", // ???
@SamantazFox
SamantazFox / contents.html
Created April 18, 2021 17:21
Tiny CSS-only on/off button
<div>
<!-- This can be placed in any structure element, like <div>, <td>, etc... -->
<input id="my_checkbox1" name="input1" type="checkbox" hidden="">
<label for="my_checkbox1"><span></span></label>
</div>
@SamantazFox
SamantazFox / computer_specs.sh
Last active December 1, 2022 00:07
A quick set of (almost) one-liner functions to retrieve a Liux/BSD computer's specifications from the shell.
#
# Distro name
#
# Ubuntu / Debian
if [ -e /etc/lsb-release ]; then
. /etc/lsb-release
distro="$DISTRIB_ID $DISTRIB_RELEASE $DISTRIB_CODENAME"
# RedHat / Fedora / CentOS
@SamantazFox
SamantazFox / remove-emojis-twitter.scss
Created May 15, 2020 15:59
Remove Emojis from twitter/tweetdeck (needs stylish extension or equivalent)
@-moz-document domain("twitter.com") {
/*
* New twitter
*/
/* Emojis everywhere */
/*div.css-1dbjc4n span.r-bnwqim.r-h9hxbl { display: none }*/
/* Emojis in twitter names */
@SamantazFox
SamantazFox / winlang.h
Created May 3, 2020 12:09
Header containing all the languages codes used in Microsoft Windows programs
/*
* winlang.h
*
* Language Identifier Constants and Strings for Microsoft Windows
*
* Extracted from:
* https://docs.microsoft.com/en-us/windows/desktop/Intl/language-identifier-constants-and-strings
*
* Disclaimer: As the data below was extracted from Microsoft website, I'm NOT
* responsible for any geo-political issues that may come from their sorting
@SamantazFox
SamantazFox / wintypes.h
Last active May 15, 2024 21:15
Header containing all C types used by the Microsoft Win32 API
/*
* wintypes.h
*
* Windows Data Types
* Copyright 2020 (c) Samantaz Fox
*
* This file is in the public domain.
* Feel free to copy, modify, redistribute it!
*
@SamantazFox
SamantazFox / motd.sh
Last active August 20, 2020 22:23
My personnalized MOTD display
#!/bin/sh
# Import color definitions
. $ZDOTDIR/colors
# Get OS details
. $ZDOTDIR/distro_specs
#
@SamantazFox
SamantazFox / term_colors.sh
Created May 2, 2020 15:22
Pre-defined colors codes for a colorful terminal :D
# Pre-defined colors codes for a colorful terminal :D
# COLOR_Lxxx means light color
#-----------Foreground Colors------------
#
# Black 0;30 Dark Grey 1;30
# Blue 0;34 Light Blue 1;34
# Green 0;32 Light Green 1;32
# Cyan 0;36 Light Cyan 1;36
# Red 0;31 Light Red 1;31