Skip to content

Instantly share code, notes, and snippets.

View nattadasu's full-sized avatar
🐋

Sultan Iskandar Maulana nattadasu

🐋
View GitHub Profile
@trongthanh
trongthanh / gist:2779392
Last active April 24, 2024 23:46
How to move a folder from one repo to another and keep its commit history
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html
# First of all you need to have a clean clone of the source repository so we didn't screw the things up.
git clone git://server.com/my-repo1.git
# After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command
git filter-branch --subdirectory-filter your_dir -- -- all
# This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command.
@ozh
ozh / new empty git branch.md
Last active May 29, 2024 00:00
Create a new empty branch in Git
$ git checkout --orphan NEWBRANCH
$ git rm -rf .

--orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry.

You can then start adding files and commit them and they will live in their own branch. If you take a look at the log, you will see that it is isolated from the original log.

@darekkay
darekkay / trakt-backup.php
Last active June 13, 2024 18:20
Trakt.tv backup script
<?php
/*
Backup script for trakt.tv (API v2).
Live demo: https://darekkay.com/blog/trakt-tv-backup/
*/
// create a Trakt app to get a client API key: http://docs.trakt.apiary.io/#introduction/create-an-app
$apikey = "CLIENT_API_KEY";
@alok-mishra
alok-mishra / trakt-remove-all-from-collection.js
Last active May 6, 2024 04:51
Remove all items from Trakt collection
// Removes all items from a page of the Trakt collection
// Run script from console of user's collection page
// Must be run on each page
$(".posters .grid-item").each(function() {
actionWatch($(this).closest('.grid-item'), 'collect', true)
})
@ankurk91
ankurk91 / github_gpg_key.md
Last active June 7, 2024 14:31
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@JacobJohansen
JacobJohansen / AuthyToOtherAuthenticator.md
Created October 20, 2017 15:12 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes (beware, through Google) for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My gues

@ObserverOfTime
ObserverOfTime / BDLinux.md
Last active June 11, 2024 06:48
Install BetterDiscord on Linux

Install BetterDiscord on Linux

This Gist contains simple instructions on how to install, update, and uninstall BetterDiscord on Linux.

For more thorough documentation, take a look at betterdiscordctl's README.

Do NOT submit issues here as I don't check the comments. You should submit them here instead.

### Flatpak Repos
List packages on a repo :
flatpak remote-ls repon-name --user
flatpak remote-ls
Install packages :
flatpak --user install repo-name package-name io.liri.Platform
Flathub:
@zhuowei
zhuowei / kaios_a405dl.js
Last active July 27, 2023 18:56
from /system/b2g/webapps/launcher.gaiamobile.org/application.zip, dist/vendors.js
if ("TRACFONE" === r) {
n.instantDialNumbers = ["*#06#", "*#07#", "*#2886#", "*#837837#", "*#16#", "###232#", "*#7810#", "##4382#", "*#4636#", "*#3228#", "*#22384#*", "*#*#33284#*#*", "*#*#3646633#*#*", "*#7260#", "*#7265#", "#83865625#", "#83782887#", "*#*#05743424#*#*"];
"FRM" === navigator.engmodeExtension.getPropertyValue("ro.operator.name.tf.frm") && m.default.get("debugger.remote-mode").then(function(e) {
"disabled" !== e && (n.debuggerRemoteMode = !0, n.instantDialNumbers = n.instantDialNumbers.concat(["*#8378269#"]))
}), o = !1
} else n.instantDialNumbers = ["*#06#", "*#07#", "*#2886#", "*#228378#", "##4382#", "*#*#33284#*#*", "*#*#3646633#*#*", "*#4636#", "*#*#825364#*#*", "*#3228#", "##258#", "*#7977767#", "*#7810#", "*#837837#", "*#16#", "*#22384#*", "*#*#123321#*#*", "*#6626625#", "*#*#0574#*#*", "###232#", "*#*#9328378#*#*", "##3424#"], m.default.get("debugger.remote-mode").then(fun
@Log1x
Log1x / README.md
Last active November 28, 2023 21:15
Uptime Robot Discord Webhook

Uptime Robot Webhook for Discord

Screenshot

Configuration

  • Alert Contact Type: Web-Hook
  • URL to Notify: https://discordapp.com/api/webhooks/CHANGEME/CHANGEME?
    • Must end with ?