Instantly share code, notes, and snippets.
Discover gists
mdasifmunshe /Install Tailwind CSS v4 with Vite and Yarn
Last activeOctober 8, 2025 02:40
Setting up Tailwind CSS in a Vite app with Yarn This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
/* | |
The following gist is tested with react+typescript+swc. | |
Other Framework may differ from each other at "vite.config.ts" file. | |
*/ | |
/* Terminal */ | |
yarn create vite my-app | |
cd my-app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
""" | |
Example of using fcntl.flock for locking file. Some code inspired by filelock module. | |
""" | |
importos | |
importfcntl | |
importtime | |
defacquire(lock_file): |
rajkosto /nokia-router-cfg-tool.py
Last activeOctober 8, 2025 02:36 — forked fromthedroidgeek/nokia-router-cfg-tool.py
Nokia/Alcatel-Lucent router backup configuration tool This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# Nokia/Alcatel-Lucent router backup configuration tool | |
# G2425 support added by rajkosto on 20/11/2022 | |
# XS-2426G-B support added by rajkosto on 28/02/2023 | |
# | |
# Features: | |
# - Unpack/repack .cfg files generated from the backup and restore functionnality |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
# Forward WSL2 ports to host machine/platform (handles Windows Firewall) | |
# | |
# NOTE: 'iex' is a shortform for 'Invoke-Expression' | |
# Ports that should be forwarded to WSL2 and allowed through firewall (comma-separated) | |
$ports=@(8081); | |
# WSL IP address changes whenever WSL restarts | |
$wsl_ip=$(wsl hostname-I).Trim(); |
cliffano /minecraft-server-jar-downloads.md
Last activeOctober 8, 2025 02:29
Download links of Minecraft server jar and client jar for all versions of Minecraft This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<cstdio> | |
#include<vector> | |
#include<event2/event.h> | |
#include<glog/logging.h> | |
#include<cassert> | |
#include<string> | |
#include<cstring> | |
#include<sys/socket.h> | |
#include<netinet/in.h> |
Hdoc1509 /neovim-treesitter-and-lsp-highlighting.md
Last activeOctober 8, 2025 02:22
markasoftware /enterprise_token.rb
Last activeOctober 8, 2025 02:17
OpenProject Enterprise mode for free This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
############ If you are using DOCKER all-in-one image, create Dockerfile like: ################ | |
############ FROM openproject/openproject:16 ################ | |
############ COPY ./enterprise_token.rb app/models/enterprise_token.rb ################ | |
############ If you are runing a manual installation: ################ | |
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################ | |
############ also be sure to RESTART OpenProject after replacing the file. ################ | |
############ If using some other set up (eg docker-compose), read the comments on ################ | |
############ https://gist.github.com/markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45 ################ |
NewerOlder