Skip to content

Instantly share code, notes, and snippets.

@ritiek
ritiek / nightcore.sh
Last active January 14, 2024 11:36
Convert a track to nightcore
# Increase tempo (x1.06) and frequency (x1.25 assuming input freq. = 44100 Hz)
ffmpeg -i input.mp3 -filter:a "atempo=1.06,asetrate=44100*1.25" output.mp3
# Without tempo
ffmpeg -i input.mp3 -filter:a "asetrate=44100*1.25" output.mp3
# Create one frame .mp4 from .mp3 + .jpg
ffmpeg -i output.mp3 -i anime.jpg output.mp4
# Do above in single command
ffmpeg -i input.mp3 -i anime.jpg -filter:a "atempo=1.06,asetrate=44100*1.25" -vn output.mp4
@ritiek
ritiek / forker.py
Created June 6, 2018 17:37
Fork all your starred repositories to an organization you own
from github import Github
TOKEN =
ORGANIZATION =
g = Github(TOKEN)
organ = g.get_organization(ORGANIZATION)
user = g.get_user()
for repo in user.get_starred():
@ritiek
ritiek / PlasmaPy.md
Last active March 25, 2019 13:19
My OpenAstronomy GSoC 2018 Application
@ritiek
ritiek / wolfpedia.py
Last active April 28, 2019 09:01
Fetch information from wolfram and wikipedia using Flask API
import wolframalpha
import wikipedia
from wikipedia.exceptions import DisambiguationError
from flask import Flask
app = Flask(__name__)
client = wolframalpha.Client('T27H46-H3TH6GL545')
def wolframit(query):
@ritiek
ritiek / count.sh
Last active December 19, 2018 13:37
Count number of lines of code in a project
find . -name "*.py" -type f -exec grep . {} \; | wc -l
@ritiek
ritiek / devenv.sh
Last active January 27, 2018 07:01
Setup rust-lang local development environment
# git clone https://github.com/rust-lang/rust
# cd rust
# <make changes to source if any>
# full build (1st time)
./x.py install
rustup toolchain link develop build/x86_64-unknown-linux-gnu/stage2
rustup default develop
rustc -V
@ritiek
ritiek / hosts
Last active July 3, 2023 05:16
hosts file to block all GameRanger advertisements
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#

If you have no idea what this is about. See https://github.com/ritiek/piano-rs.

Dragonborn Comes

FG(FB) (FB)J(BK) (BK)W(GJ)BGF x2

Kataware Doki

(qu) u u (nu) trre(ct)m e

Keybase proof

I hereby claim:

  • I am ritiek on github.
  • I am ritiek (https://keybase.io/ritiek) on keybase.
  • I have a public key ASA1qFuAESdfigezYxV8q4XPEY6hqSk8UHvogWNRJCsKJwo

To claim this, I am signing this object:

@ritiek
ritiek / README.md
Last active February 20, 2019 13:46
Aww yiss! Rick n' Roll Android Apps