Skip to content

Instantly share code, notes, and snippets.

View xamantra's full-sized avatar
:octocat:
They see me loading, They waiting

xamantra xamantra

:octocat:
They see me loading, They waiting
  • xamantra
  • Philippines
View GitHub Profile
@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 () {
@xamantra
xamantra / relative_scaler.dart
Created January 18, 2020 07:09
RelativeScaler is a custom sizing system for flutter widgets to achieve the same physical sizes across different devices.
mixin RelativeScaler {
double _screenHeight;
double _screenWidth;
/// `RelativeScaler.screenHeight` -> the height of the screen.
double get screenHeight => _screenHeight;
/// `RelativeScaler.screenWidth` -> the width of the screen.
double get screenWidth => _screenWidth;
@xamantra
xamantra / dart_types.dart
Last active June 14, 2020 07:53
A small script to compare dart's "foo is T" and "runtimeType" type checks
Type type<T>() => T;
class Settings {
// logic here ...
}
class ASettings extends Settings {
// logic here ...
}
@xamantra
xamantra / [MyAnimeList] Average-Duration&Average-Episode.js
Last active August 28, 2020 04:35
A script extending MyAnimeList.net for displaying average duration per episode and average number of episodes per entry.
// ==UserScript==
// @name [MyAnimeList] Average-Duration&Average-Episode
// @namespace http://tampermonkey.net/
// @version 1.2
// @description A script for extending MyAnimeList.net for displaying average duration per episode and average number of episodes per entry.
// @author xamantra
// @updateURL https://gist.githubusercontent.com/xamantra/e3dd9b11909a0375103af150d9bbe0e5/raw/dd0a389d1f0d2b84576688045dfdbe71a2a7684c/%255BMyAnimeList%255D%2520Average-Duration&Average-Episode.js
// @downloadURL https://gist.githubusercontent.com/xamantra/e3dd9b11909a0375103af150d9bbe0e5/raw/dd0a389d1f0d2b84576688045dfdbe71a2a7684c/%255BMyAnimeList%255D%2520Average-Duration&Average-Episode.js
// @supportURL https://gist.github.com/xamantra/e3dd9b11909a0375103af150d9bbe0e5
// @match https://myanimelist.net/profile/*
@xamantra
xamantra / mock_anime_list.json
Created August 21, 2021 09:21
mock data for the app I'm developing.
{
"count": 252,
"list": [
{
"slug": "beyblade_burst_sparking_dub",
"title": "Beyblade Burst Sparking",
"thumbnail_url": "https://api-cdn.myanimelist.net/images/anime/1332/106530.jpg",
"type": "dub",
"alternative_titles": "ベイブレードバースト スパーキング",
"status": "Ongoing",
@xamantra
xamantra / mock_news_feed.json
Created August 21, 2021 09:42
mock data for the app I'm developing
{
"page": 1,
"count": 73,
"feed": [
{
"title": "Mei-chan no Shitsuji DX Manga Goes on Hiatus Due to Author's Injury",
"permalink": "https://www.animenewsnetwork.com/news/2021-08-21/mei-chan-no-shitsuji-dx-manga-goes-on-hiatus-due-to-author-injury/.176426",
"utcTimestampSeconds": 1629537410,
"provider": "ANIME_NEWS_NETWORK",
"sourceDomain": "www.animenewsnetwork.com"
@xamantra
xamantra / mock_mal_user_animelist.json
Created August 21, 2021 10:43
mock data for the app I'm developing
{
"data": [
{
"node": {
"id": 44881,
"title": "100-man no Inochi no Ue ni Ore wa Tatteiru 2nd Season",
"main_picture": {
"medium": "https://api-cdn.myanimelist.net/images/anime/1683/115662.jpg",
"large": "https://api-cdn.myanimelist.net/images/anime/1683/115662l.jpg"
}