Skip to content

Instantly share code, notes, and snippets.

@tuksik
tuksik / fix_git_ps1.sh
Last active May 4, 2024 13:56
Fix -bash: __git_ps1: command not found
#http://stackoverflow.com/questions/12870928/mac-bash-git-ps1-command-not-found
curl -o ~/.git-prompt.sh https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
echo 'source ~/.git-prompt.sh' >> ~/.bashrc
@TameemS
TameemS / debloatMEmu.md
Last active May 4, 2024 13:53
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.

@fedir
fedir / .gitignore
Last active May 4, 2024 13:52 — forked from Avinashachu007/.gitignore
.gitignore for Java, Maven, Spring Boot - Eclipse, Netbeans, IntelliJ IDEA, Visual Studio Code
/target/
!.mvn/wrapper/maven-wrapper.jar
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
@xamantra
xamantra / [ANIME]MyAnimeList-DeleteAllEntry-ClassicListStyle.js
Last active May 4, 2024 13:52
Delete all entries inside a list category in MAL. Useful for getting a fresh start in your Plan to Watch or any other section (Completed, On Hold, Dropped, Currently Watching).
var index = 0;
if (confirm(`Are you sure you want to DELETE ALL your entries in this section?`)) {
$("a.animetitle").each(function () {
var animeLink = $(this).attr("href");
var animeId = animeLink.substring(
animeLink.lastIndexOf("anime/") + 6,
animeLink.lastIndexOf("/")
);
var deleteUrl = `/ownlist/anime/${animeId}/delete`;
setTimeout(function () {
@slowkow
slowkow / ssh-tutorial.md
Last active May 4, 2024 13:52
ssh to a server without typing your password

How to ssh to a remote server without typing your password

Save yourself a few keystrokes. Follow the steps below:

  1. Run this Bash script on your laptop:

    #!/usr/bin/env bash
    

The hostname of your remote server.

@spiderbala
spiderbala / Steam_Deck_Samba.sh
Last active May 4, 2024 13:50
Steam Deck 安裝samba文件分享協定,自動化腳本(包含samba反安裝腳本)
#!/bin/bash
# 將用戶密碼用作此次腳本的變量,免於後續多次重覆輸入密碼
read -s -p "輸入用戶密碼: " user_password
echo
# 解除唯讀模式
if echo "$user_password" | sudo -S steamos-readonly disable; then
echo
echo "唯讀模式已解除"
else
echo -e "\e[93m密碼輸入錯誤,腳本終止。\e[0m"
@mpneuried
mpneuried / Makefile
Last active May 4, 2024 13:46
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active May 4, 2024 13:43
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
@astr0sl0th
astr0sl0th / syncData.js
Created July 22, 2023 15:12
Keep your Supabase data in sync with Algolia
const algoliasearch = require('algoliasearch');
const { createClient } = require('@supabase/supabase-js');
// Initialize Algolia client
const algoliaClient = algoliasearch('ALGOLIA_APP_ID', 'ALGOLIA_API_KEY');
const index = algoliaClient.initIndex('INDEX_NAME');
// Initialize Supabase client
const supabaseUrl = 'SUPABASE_URL';
const supabaseKey = 'SUPABASE_SERVICE_KEY';