Skip to content

Instantly share code, notes, and snippets.

View pixeldesu's full-sized avatar
💥
npx yarn install

Andreas Nedbal pixeldesu

💥
npx yarn install
View GitHub Profile
@pixeldesu
pixeldesu / bandcamp_collection_trackcount.js
Created March 4, 2022 20:28
Small script to get the (almost) total of tracks present in an entire Bandcamp collection
/* Open your (or any other) Bandcamp profile, press the "show all x items" button and scroll to the very bottom of the
* page, with this you populate the collection item cache which we then can use to mess around with data
*/
let tracks = 0;
(Object.values(ItemCache.collection)).forEach((tra) => {
tracks += parseInt(tra.num_streamable_tracks)
});
console.log(`Your collection contains ${tracks} streamable tracks (this means the actual track count might be slightly higher)`);
@pixeldesu
pixeldesu / keybase.md
Created December 6, 2019 13:49
keybase proof

Keybase proof

I hereby claim:

  • I am pixeldesu on github.
  • I am pixeldesu (https://keybase.io/pixeldesu) on keybase.
  • I have a public key whose fingerprint is 3E0B 4981 44C9 7156 64C0 0FBB BD0F F45A 63BD 8FBA

To claim this, I am signing this object:

@pixeldesu
pixeldesu / moduleraid.js
Created January 2, 2018 23:38
webcrack successor to mess with webpack modules in a different structured webpackJsonp build
// moduleRaid
// made by @pixeldesu
// based on the idea and initial implemention of this concept from
// no-boot-device, called webcrack
// this self-executing function creates a window.mR object with following properties
// mR.modules contains all modules we were able to get from Webpack
// mR.get(id) allows you to get a module by the specified ID
// mR.findModule(query) allows you to find module(s) by searching for an exact export key
@pixeldesu
pixeldesu / TD_favstar.js
Last active March 27, 2017 13:54
Add Favstar action to Tweet actions
// This replaces the template for the dropdown menu contents with a new copy that includes a Favstar link to the specific status.
// For some reason, this sometimes works and sometimes doesn't. This can also be done way cleaner,
// this code is just some kind of proof-of-concept.
TD_mustaches["menus/actions.mustache"] = TD_mustaches["menus/actions.mustache"].replace(
'<ul> {{#chirp}} {{#user}}{{^isProtected}} <li class="is-selectable"><a href="#" data-action="embed">{{_i}}Embed this Tweet{{/i}}</a></li> <li class="is-selectable"><a href="#" data-action="reference-to">{{_i}}Copy link to this Tweet{{/i}}</a></li> <li class="is-selectable"><a href="#" data-action="message-to">{{_i}}Share via Direct Message{{/i}}</a></li> <li class="is-selectable"><a href="#" data-action="email">{{_i}}Share via Email{{/i}}</a></li> <li class="drp-h-divider"></li> {{/isProtected}}{{/user}} {{/chirp}} {{#user}} <li class="is-selectable"><a href="#" data-action="mention" class="txt-ellipsis">{{_i}}Tweet to @{{screenName}}{{/i}}</a
### Keybase proof
I hereby claim:
* I am pixeldesu on github.
* I am pixeldesu (https://keybase.io/pixeldesu) on keybase.
* I have a public key whose fingerprint is CDAF 8633 6433 5D1B 4B34 7422 CD5E CC7C 5610 3BFE
To claim this, I am signing this object:
@pixeldesu
pixeldesu / direct-message.scss
Created July 12, 2015 17:57
hiding read direct messages
.tweet-message .l-table {
display: none !important;
}
.tweet-message .tweet-avatar {
width: 24px;
height: 24px;
}
.is-unread .tweet-message .l-table {
@pixeldesu
pixeldesu / get_all.rb
Created June 30, 2015 16:41
Violetear example outputs
[#<Violetear::LibraryEntry:0x000000017f8e00
@anime=
#<Violetear::Anime:0x000000017f8450
@age_rating="PG13",
@alternate_title=nil,
@community_rating=3.64135311586392,
@cover_image=
"https://static.hummingbird.me/anime/poster_images/000/007/243/large/7243.jpg?1408460749",
@episode_count=5,
@episode_length=10,
@pixeldesu
pixeldesu / test.rb
Created June 30, 2015 13:15
LibraryEntry output <3
#<Violetear::LibraryEntry:0x00000002436758
@anime=
#<Violetear::Anime:0x0000000244a618
@age_rating="PG13",
@alternate_title="Engaged to the Unidentified",
@community_rating=3.78955205599713,
@cover_image=
"https://static.hummingbird.me/anime/poster_images/000/008/027/large/MDS.jpg?1408463286",
@episode_count=12,
@episode_length=23,
@pixeldesu
pixeldesu / worstlineofcode.haml
Created May 27, 2015 00:32
THE LONGEST LINE OF HAML YOU WILL EVER SEE
= raw t('views.answerbox.question', user: user_screen_name(a.question.user, a.question.author_is_anonymous), time: (@user.nil? or a.question.author_is_anonymous) ? tooltip(time_ago_in_words(a.question.created_at), a.question.created_at, "bottom") : link_to(tooltip(time_ago_in_words(a.question.created_at), a.question.created_at, "bottom"),show_user_question_path(a.question.user.screen_name, a.question.id)))
@pixeldesu
pixeldesu / TDE-register.js
Created March 22, 2015 14:20
I'm not exactly sure for what we are registering...
function PostRegistration() {
progressind.innerHTML = "Migrating to 512-bit crypto identifier...";
$.ajax( "https://dangeredwolf.com/tdedb/register.php?regname=" + GetPreferencesIdentifierFromCrypto())
.done(function(meh) {
if (meh === "OK") {
progressind.innerHTML = "Upgrade Complete!";
setTimeout(function(){
progressind.innerHTML = "Welcome to Enhancer 5.0.4";
},1000);
setTimeout(function(){