Skip to content

Instantly share code, notes, and snippets.

@TameemS
TameemS / debloatMEmu.md
Last active May 4, 2024 19:42
Debloating & Optimizing MEmu

Inspired by this

More of my guides: Debloating LDPlayer - Debloating Nox (Updated)

Edit 22/8/2021: I have updated MEmu and it seems like it reinstalls the apps and re-enables the services. Repeat steps 5, 7, 8, and 9 if you update MEmu.

Debloating MEmu

In my experience, Nox can be quite slow and choppy, and looks like I'm not the only person with this problem. A lot of people say that MEmu performs better than Nox, and I could agree with that. I have no chopping issues with it so far. But like Nox, there are kinda shady stuff going on.

@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active May 4, 2024 19:42
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.
@remorses
remorses / renamer.ts
Last active May 4, 2024 19:40
Babel `BatchRenamer`, 100x faster babel `scope.rename()` when you have many identifier to rename
// original https://github.com/babel/babel/blob/9c77558234c87b9220604fbc1519089e2d6334e2/packages/babel-traverse/src/scope/lib/renamer.ts#L61
import splitExportDeclaration from '@babel/helper-split-export-declaration'
import type { Scope } from '@babel/traverse'
import { visitors } from '@babel/traverse'
import { traverseNode } from '@babel/traverse/lib/traverse-node'
import * as t from '@babel/types'
import { NodePath, Visitor } from '@babel/core'
import type { Identifier } from '@babel/types'
@jeznag
jeznag / check_that_message_can_be_sent.ds
Created March 6, 2024 04:19
Zoho Desk integration via Zoho Flow
map check_that_message_can_be_sent(int ticket_id, string sms_content, string send_btn_state, string channel, int desk_org_id)
{
try
{
if(channel != "SMS via Zoho Flow" || sms_content.isEmpty() || send_btn_state != "true")
{
info "stop processing outbound";
info "channel> " + channel;
info "sms_content> " + sms_content;
info "send_btn_state> " + send_btn_state;

An guide how to activate Windows 11 Pro for free

Why?

Because you will get some more features like an Bitlocker and host your device as an External Desktop which can be accessed through the internet

Am i also able to switch from any other edition to Pro?

The answer is yes! You can switch from almost any edition to Pro completely for free!

Note for users with unactivated Pro edition

People which already have Pro, but not activated, can skip to this step.

Getting started

What you first need to do is open CMD (Command Prompt) as Administrator using this keyboard key:

//
// DefaultAnimationWithAnimation.swift
// OpenSwiftUIAnimations
//
// Created by Amos Gyamfi on 16.3.2024.
//
import SwiftUI
struct DefaultAnimationWithAnimation: View {
import hotkeys, { HotkeysEvent } from 'hotkeys-js';
import { useEffect, useCallback } from 'preact/hooks';
/**
* A Preact hook for triggering side-effects when pressing hotkeys.
*
* @param keys A comma-separated list of hotkeys to trigger the callback on.
* @param callback A callback function to execute when keys are pressed.
* @param dependencies A list of dependencies.
*/
@Na-Nazhou
Na-Nazhou / mactex.md
Last active May 4, 2024 19:26
Install MacTex on MacOS

macOS version: 10.15.6

  1. Install MacTex with Homebrew
brew cask install mactex-no-gui
  1. Updating the packages
sudo tlmgr update --self && sudo tlmgr update --all
@tomnomnom
tomnomnom / simple-json-api.go
Created December 20, 2014 16:34
Simple JSON API Server in Go
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
)
// The `json:"whatever"` bit is a way to tell the JSON
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active May 4, 2024 19:24
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent