Skip to content

Instantly share code, notes, and snippets.

View sawaYch's full-sized avatar
🐧
Focusing

Sawa sawaYch

🐧
Focusing
View GitHub Profile
@thesamesam
thesamesam / xz-backdoor.md
Last active May 4, 2024 09:26
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@mjbalcueva
mjbalcueva / password-input.tsx
Last active May 5, 2024 14:13
shadcn ui custom password input
"use client"
import { forwardRef, useState } from "react"
import { EyeIcon, EyeOffIcon } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Input, InputProps } from "@/components/ui/input"
import { cn } from "@/lib/utils"
const PasswordInput = forwardRef<HTMLInputElement, InputProps>(
({ className, ...props }, ref) => {
@banyudu
banyudu / auto_publish_npm_and_generate_github_changelog.blog.md
Created April 23, 2020 22:43
自动化发布npm包及生成Github Changelog

手动维护npm包容易出现一些问题:忘记编译、多提交一些无关文件、网络不通等。自动化发布能够极大地简化这个过程。

最近刚调整过一次自动化流程,可以自动发布版本,及根据Commit消息生成Changelog。实现如下图所示的效果:

Demo效果图

@jimmyltsinn
jimmyltsinn / cloudSettings
Last active September 11, 2020 18:19
Vs Code SettingsSync
{"lastUpload":"2020-09-11T18:19:00.291Z","extensionVersion":"v3.4.3"}
@kitce
kitce / lihkg-label-users.user.js
Last active May 9, 2021 01:54
LIHKG - Label users
// ==UserScript==
// @name LIHKG Label Users
// @namespace https://gist.github.com/kitce
// @version 0.18
// @description Label users on LIHKG
// @author kitce
// @include https://lihkg.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
# import the azure ad module
Import-Module AzureADPreview
# connect with an admin with proper priviledges
Connect-AzureAD
# specify the policyname and Azure application name
$policyName = "yourPolicyName"
$applicationName = "yourApplicationName"
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active May 5, 2024 18:30
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
Serial Keys:
FU512-2DG1H-M85QZ-U7Z5T-PY8ZD
CU3MA-2LG1N-48EGQ-9GNGZ-QG0UD
GV7N2-DQZ00-4897Y-27ZNX-NV0TD
YZ718-4REEQ-08DHQ-JNYQC-ZQRD0
GZ3N0-6CX0L-H80UP-FPM59-NKAD4
YY31H-6EYEJ-480VZ-VXXZC-QF2E0
ZG51K-25FE1-H81ZP-95XGT-WV2C0
VG30H-2AX11-H88FQ-CQXGZ-M6AY4
{
"configurations": [
{
"name": "Mac",
"includePath": [
"/usr/local/Cellar/arm-gcc-bin@8/8-2019-q3-update_1/arm-none-eabi/include/**",
"/usr/local/Cellar/arm-gcc-bin@8/8-2019-q3-update_1/lib/gcc/arm-none-eabi/8.3.1/include/**",
"/usr/local/Cellar/arm-gcc-bin@8/8-2019-q3-update_1/lib/gcc/arm-none-eabi/8.3.1/include-fixed/**",
"/usr/local/Cellar/avr-gcc@8/8.4.0_2/avr/include/**",
"/usr/local/Cellar/avr-gcc@8/8.4.0_2/lib/avr-gcc/8/gcc/avr/8.4.0/include/**",