Discover gists
This file contains 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
# https://www.atpeaz.com/disable-zscaler-temporarily-on-your-mac/ | |
# disable | |
sudo launchctl unload /Library/LaunchDaemons/com.zscaler.service.plist && sudo launchctl unload /Library/LaunchDaemons/com.zscaler.tunnel.plist | |
# Reenable | |
sudo launchctl load /Library/LaunchDaemons/com.zscaler.service.plist && sudo launchctl load /Library/LaunchDaemons/com.zscaler.tunnel.plist |
This file contains 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 python | |
# __author__ = 'c4mx' | |
from pbkdf2 import PBKDF2 | |
from binascii import a2b_hex | |
import hmac, hashlib, binascii | |
# passphrase: WPA wifi password | |
def calc_pmk(passphrase, ssid): | |
return PBKDF2(passphrase, ssid, 4096).read(32) |
This file contains 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
# GitHub Copilot Instructions for REST API Development | |
## General Guidelines: | |
- Follow modern **TypeScript** best practices. | |
- Prioritize **modular and reusable code** for maintainability. | |
- Always use **ESLint** and **Prettier** for code formatting and linting. | |
- Ensure compatibility with **Node.js LTS versions**. | |
## API Development: | |
- Adhere to **RESTful API principles**. |
This file contains 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
# Tailwind CSS v4.0 | |
## Core Changes | |
- **CSS-first configuration**: Configuration is now done in CSS instead of JavaScript | |
- Use `@theme` directive in CSS instead of `tailwind.config.js` | |
- Example: | |
```css | |
@import "tailwindcss"; |
This file contains 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
#!/bin/bash | |
# reset jetbrains ide evals v1.0.4 | |
OS_NAME=$(uname -s) | |
JB_PRODUCTS="IntelliJIdea CLion PhpStorm GoLand PyCharm WebStorm Rider DataGrip RubyMine AppCode" | |
if [ "$OS_NAME" == "Darwin" ]; then | |
echo 'macOS:' | |
for PRD in $JB_PRODUCTS; do |
This file contains 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 initial version | |
if [ ! -f .env ] | |
then | |
export $(cat .env | xargs) | |
fi | |
# My favorite from the comments. Thanks @richarddewit & others! | |
set -a && source .env && set +a |
This file contains 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
--- Actions --- | |
$Copy <M-C> | |
$Cut <M-X> <S-Del> | |
$Delete <Del> <BS> <M-BS> | |
$LRU | |
$Paste <M-V> | |
$Redo <M-S-Z> <A-S-BS> | |
$SearchWeb <A-S-G> | |
$SelectAll <M-A> | |
$Undo <M-Z> |
This file contains 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
import { useCallback, useMemo, useRef } from 'react'; | |
import { useUnmount } from '~lib/hooks/use-unmount'; | |
import type { VoidFn } from '~lib/utils/types'; | |
interface ScheduleOptions { | |
tag?: string; | |
} | |
interface ScheduleOnceOptions { |
NewerOlder