Skip to content

Instantly share code, notes, and snippets.

View hXtreme's full-sized avatar
:octocat:
Improving your experience. Please wait...

Harsh Parekh hXtreme

:octocat:
Improving your experience. Please wait...
View GitHub Profile
@hXtreme
hXtreme / LibraryNavigationView.kt
Last active July 10, 2019 10:12
Template for when I try to implement filters for categories in Tachiyomi.
inner class CategoryGroup : Group {
private val categories = List<Category>(0)
override val items = categories.map { category -> Item.TriStateGroup( category.id, this) }
override val header = Item.Header(R.string.categories)
override val footer = Item.Separator()
@hXtreme
hXtreme / MangaInfoControler.kt
Created July 10, 2019 19:22
The changes I made when trying to provide Migration from within Manga Info page.
import eu.kanade.tachiyomi.ui.migration.MigrationController
import eu.kanade.tachiyomi.ui.migration.SearchController
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.action_open_in_browser -> openInBrowser()
R.id.action_open_in_web_view -> openInWebView()
R.id.action_share -> shareManga()
R.id.action_add_to_home_screen -> addToHomeScreen()
R.id.action_migrate -> migrate()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hXtreme
hXtreme / vid-tweet.sh
Created July 20, 2019 17:32
ffmpeg-twitter
ffmpeg -i $input -vcodec libx264 -pix_fmt yuv420p -strict -2 -acodec aac ${input%.*}.mp4
@hXtreme
hXtreme / Checkout.md
Last active September 13, 2022 19:55
A list of Interesting things.

Checkout

Entry format: For interesting/usefull thing, checkout


  • For a real life example of Kodein, checkout.
  • For documentation about Github actions, checkout.
  • For tutorial on how to use Github secrets, checkout
  • For a free book on UI recomended by Brian Kernighan, checkout.
---
Language: Cpp
# BasedOnStyle: WebKit
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: false
AlignTrailingComments: false
% --- Radix-2 Decimation In Frequency - Iterative approach
clear all
close all
clc
% --- N should be a power of 4
N = 1024;
% x = randn(1, N);
@hXtreme
hXtreme / lut.py
Created February 16, 2020 05:59
Bit-reversal lookup table
val = [[ 0, 2, 1, 3, ],
[ 0, 4, 2, 6, 1, 5, 3, 7, ],
[ 0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15, ],
[ 0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23, 15, 31, ],
[ 0, 32, 16, 48, 8, 40, 24, 56, 4, 36, 20, 52, 12, 44, 28, 60, 2, 34, 18, 50, 10, 42, 26, 58, 6, 38, 22, 54, 14, 46, 30, 62, 1, 33, 17, 49, 9, 41, 25, 57, 5, 37, 21, 53, 13, 45, 29, 61, 3, 35, 19, 51, 11, 43, 27, 59, 7, 39, 23, 55, 15, 47, 31, 63, ],
[ 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52, 116, 12, 76, 44, 108, 28, 92, 60, 124, 2, 66, 34, 98, 18, 82, 50, 114, 10, 74, 42, 106, 26, 90, 58, 122, 6, 70, 38, 102, 22, 86, 54, 118, 14, 78, 46, 110, 30, 94, 62, 126, 1, 65, 33, 97, 17, 81, 49, 113, 9, 73, 41, 105, 25, 89, 57, 121, 5, 69, 37, 101, 21, 85, 53, 117, 13, 77, 45, 109, 29, 93, 61, 125, 3, 67, 35, 99, 19, 83, 51, 115, 11, 75, 43, 107, 27, 91, 59, 123, 7, 71, 39, 103, 23, 87, 55, 119, 15, 79, 47, 111, 31, 95, 63, 1
@hXtreme
hXtreme / Page1.md
Last active July 6, 2020 05:27
Jekyll⨯Github - Static site generation tutorial

Jekyll⨯Github

<[PREV]|[NEXT]>

What the static site generator?

A static site is a collection of pages containing just basic HTML, CSS and JS files.

A static site generator generates a static site from other (usually easier to work with) files.

@hXtreme
hXtreme / plot.py
Created March 4, 2020 17:49
Use this instead of matplotlib
# Note to self use seaborn instead of matplotlib
import seaborn as sns
sns.set(style='ticks', palette='Set2')
sns.despine()
# The above would setup seaborn to use prettyplotlib style see: https://github.com/olgabot/prettyplotlib