Skip to content

Instantly share code, notes, and snippets.

@Sp5rky
Sp5rky / wingetinstall.ps1
Created October 7, 2023 00:32
Winget Installation
# Fetch the URI of the latest version of the winget-cli from GitHub releases
$latestWingetMsixBundleUri = $(Invoke-RestMethod https://api.github.com/repos/microsoft/winget-cli/releases/latest).assets.browser_download_url | Where-Object { $_.EndsWith('.msixbundle') }
# Extract the name of the .msixbundle file from the URI
$latestWingetMsixBundle = $latestWingetMsixBundleUri.Split('/')[-1]
# Show a progress message for the first download step
Write-Progress -Activity 'Installing Winget CLI' -Status 'Downloading Step 1 of 2'
# Temporarily set the ProgressPreference variable to SilentlyContinue to suppress progress bars
@jeansordes
jeansordes / instagram_video_ctrls.js
Last active January 1, 2023 23:45
Userscript for adding video controls on Instagram in your browser
// ==UserScript==
// @name Instagram Video Controls
// @namespace https://jzs.fr/
// @version 1.0
// @description Adds video player controls to Instagram videos
// @author JZS
// @match https://www.instagram.com/
// @match https://www.instagram.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=instagram.com
// @grant none
@ackvf
ackvf / README.md
Last active October 13, 2022 22:47
Bookmarklets

How to create and use Bookmarklets?

Create new Bookmark

add new bookmark page

Edit Bookmark details

  • Name: for example "Enable 2/5/10 sec rewind | Netflix"
  • URL: paste the script
@rjescobar
rjescobar / extend-trial-jetbrains-windows.bat
Created August 31, 2021 02:53
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
@sindresorhus
sindresorhus / esm-package.md
Last active July 15, 2024 20:29
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@divyajyotiuk
divyajyotiuk / get_twitter_bookmarks.py
Last active February 10, 2024 05:40
Python code to get text and link of the bookmarked tweets and save in markdown
import json
import glob
all_bookmarks = []
md_file = open("bookmarks.md", "w+") # saving in markdown file, if no file exists using '+' creates one
files = [file for file in glob.glob("JSONBookmarks/*")] # using glob to read all files from the folder
for file_name in files:
print(file_name)
with open(file_name) as bk:
@tyru
tyru / windows-like-word.json
Created March 25, 2020 01:50
[Karabiner Elements][macOS] Windows-like word movement/selection/deletion
{
"title": "[macOS] Windows-like word movement/selection/deletion",
"rules": [
{
"description": "Ctrl + Arrow Keys to Option + Arrow Keys",
"manipulators": [
{
"from": {
"key_code": "up_arrow",
"modifiers": {
@rokibhasansagar
rokibhasansagar / gitclean.sh
Last active September 6, 2023 18:02 — forked from Zibri/gitclean.sh
Bash script to remove all revisions from github or gist repository.
#!/bin/bash
#
# By Zibri (2019)
# Modified by @rokibhasansagar
#
# Usage: gitclean git-repo-url
#
gitclean ()
{
git clone "$1" workDir && {
@YourFriendCaspian
YourFriendCaspian / win10_add_admin.txt
Last active July 4, 2022 11:43
Exploit to create a new local administrator account ADMIN with the password admin. Hide user from user settings and from login screen.
Rem:Generated by Dckuino.js by NURRL
Rem:Modified for use with ESPloit by Corey Harding
Rem:-----
Rem:Start delay
CustomDelay:1000
CustomDelay:300
Press:131+114
CustomDelay:300
Print:powershell Start-Process cmd -Verb runAs
CustomDelay:300
@rubyu
rubyu / karabiner-elements.json
Last active April 11, 2023 16:14
F1-12, ←↑↓→, Home-End, PageUp-PageDown
{
"title": "F1-12, ←↑↓→, Home-End, PageUp-PageDown",
"rules": [
{
"description": "fn + 1 -> F1",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "1",