Skip to content

Instantly share code, notes, and snippets.

View danikaze's full-sized avatar

danikaze danikaze

  • Tokyo, Japan
View GitHub Profile
@danikaze
danikaze / ipesc-remove-anti-adblocker.user.js
Last active October 26, 2024 07:23
Avoid the anti ad-blocker in SimRacing GP
// ==UserScript==
// @name Simracing GP utils
// @namespace srgp.danikaze
// @version 1.0.0
// @description Avoid the anti ad-blocker in SimRacing GP
// @author danikaze
// @source https://github.com/danikaze/ipesc
// @updateURL https://gist.github.com/danikaze/1f803cac51248068ae4b42a62416a1b1/raw/be30561cd0d5e900f403d39befa5af522209965d/ipesc-remove-anti-adblocker.user.js
// @downloadURL https://gist.github.com/danikaze/1f803cac51248068ae4b42a62416a1b1/raw/be30561cd0d5e900f403d39befa5af522209965d/ipesc-remove-anti-adblocker.user.js
// @match https://app.simracing.gp/*
@danikaze
danikaze / ffmpeg-add-subs.sh
Last active April 22, 2025 14:29
ffmpeg ops
#
# Add subtitles from a .srt (i.e. extracted before) to a .mkv file
#
ffmpeg.exe \
-i video.mkv # input 0 = video to use
-sub_charenc 'UTF-8' # support for UTF8 on subs
-f srt # subtitle format srt (change to ass when needed)
-i sub-file1.srt # input 1 = subs1
-i sub-file2.srt # input 2 = subs2
@danikaze
danikaze / multiple-git-config.md
Last active November 26, 2023 12:41
Use multiple github repositories from the same server

1. Generate the ssh key:

ssh-keygen -t ed25519 -C "username@domain"

username@domain can be your email or the username @ server domain for easier readability, or anything.

Store it using a custom filename like ~/.ssh/github-REPO

2. Add the deployment key:

@danikaze
danikaze / ipesc-helpers.user.js
Last active October 26, 2024 07:23
Set of utilities available on DevTools for IPESC racing community
This file has been truncated, but you can view the full file.
// ==UserScript==
// @name Simracing GP for IPESC
// @namespace ipesc.danikaze
// @version 0.3.1
// @description Set of utilities available on DevTools for IPESC racing community
// @author danikaze
// @source https://github.com/danikaze/ipesc
// @updateURL https://gist.github.com/danikaze/9154b3b79eb2c605687c78f4991841fd/raw/ipesc-helpers.user.js
// @downloadURL https://gist.github.com/danikaze/9154b3b79eb2c605687c78f4991841fd/raw/ipesc-helpers.user.js
// @match https://app.simracing.gp/*
@danikaze
danikaze / obs-to-premiere.sh
Created March 5, 2023 03:28
Convert OBS video to something that Premiere can read
# OBS to be configured with the following Recording options
# * Settings > Output > Recording (Advanced)
# - Recording Format: mkv
# - Recording Tracks: 2, 3
# - Encoder: NVIDIA NVENC H.264
# Convert video to something usable by Premiere
ffmpeg.exe -i input.mkv -codec copy output.mp4
# Extract the other audio track
@danikaze
danikaze / tabletop-audio-dl.js
Created April 18, 2021 18:26
Download, organize and keep sync with tabletopaudio.com files with this gist
/**
* https://tabletopaudio.com/ is an awesome source of free music.
* Consider making a donation (to him) if using his creations!
*
*
* Just place the following .js+.bat files in the location you want to download
* from tabletop audio ^^
*
* Creating symboling links (to put files inside folders based on categories)
* requires admin permissions in Win :(
/**
* Find the route to access `data` in `object`.
* Note that if there's more than one ocurrence of `data` in `object`,
* it will return an array of routes with all of them unless `onlyFirst` is
* `true`, in which case it will just a string with the first found route
* (or `undefined` if not found)
*
* @param object Object where to search for `data`
* @param data Data to find
* @param onlyFirst set to `true` to return after the first match
@danikaze
danikaze / wordpress-backup.sh
Created May 8, 2019 08:26
Backup a wordpress database and/or filesystem into one (or two) compressed files based on the input options
#!/usr/bin/env bash
#
# Wordpress site backup
#
# Backup a wordpress database and/or filesystem into one (or two)
# compressed files based on the input options
#
# Author: @danikaze <[email protected]>
#
@danikaze
danikaze / rakuten-lottery.user.js
Created December 21, 2018 01:51
Automagically join the Rakuten lottery every day
// ==UserScript==
// @name Rakuten Lottery
// @namespace http://tampermonkey.net/
// @version 0.1.0
// @description Automagically join the Rakuten lottery every day
// @author danikaze
// @homepage https://gist.github.com/danikaze/
// @match *://*/*
// @grant GM_setValue
// @grant GM_getValue
@danikaze
danikaze / repoc-show-photos-again.user.js
Created December 18, 2018 09:03
TamperMonkey script to show again profile photos in REPOC SuccessFactors
// ==UserScript==
// @name REPOC SuccessFactors Show photo again
// @namespace http://tampermonkey.net/
// @version 0.1.0
// @description Latest version of Success Factors REPOC hides the photo in the profile page. This script shows it again.
// @author danikaze
// @match https://performancemanager10.successfactors.com/xi/ui/pages/empfile/*
// @grant none
// ==/UserScript==
(function() {