Skip to content

Instantly share code, notes, and snippets.

View wmerfalen's full-sized avatar
⚒️
never stop

William Merfalen wmerfalen

⚒️
never stop
View GitHub Profile
@wmerfalen
wmerfalen / onlinesequencer-net.js
Created June 20, 2017 13:48
A tamper monkey plugin script to make chat life a lot easier
// ==UserScript==
// @name OnlineSequencer.Net Plugins
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Add some cool features/plugins to the OnlineSequencer.net app
// @author William Merfalen
// @match https://onlinesequencer.net/*
// @grant none
// ==/UserScript==
function BaseClass() {
/* define a base class property */
this.print_debug = true;
}
BaseClass.prototype = {
ajax_call: function(func, xml, promise_callback) {
/** function definition excluded for brevity … */
this.debug('calling..' + func);
},
function BaseClass() {
/* define a base class property */
this.print_debug = true;
}
BaseClass.prototype = {
ajax_call: function(func, xml, promise_callback) {
/** function definition excluded for brevity … */
this.debug('calling..' + func);
},
/**
* @typedef {object} SpecialType - creates a new type named 'SpecialType'
* @property {function} save - a function to save
*/
SpecialType.save = function(){
//
}
/** @return {SpecialType} */
Factory.createSpecialType = function(){
@wmerfalen
wmerfalen / todate.vim
Created August 25, 2021 01:39
create a TODO with the current date and start editing inside the comment
function! ToDate()
exec ":normal! o"
exec ":. ! echo '/** TODO: as of' $(date -I) ' */'"
exec ':normal! k'
exec ':normal! J'
exec ':normal! A'
exec ':normal! 2h'
exec ':startinsert'
endfunction
map <leader>di :call ToDate()<CR>
@wmerfalen
wmerfalen / rando.js
Created September 7, 2021 20:12
hit "random" link on ircz.de every 15 seconds
// ==UserScript==
// @name hit random every 15secs
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://ircz.de/p/*
// @grant none
// ==/UserScript==
@wmerfalen
wmerfalen / blog entry rough draft
Last active September 9, 2021 22:45
Lesson learned
Hindsight is 20/20. The errors of our past and our inabilities to fix them are truly the stuff of nightmares.
The existential dread of imposter syndrome... the effects of knowing that you're incapable of fixing something because you
lack the experience or proper guidance. These issues affect us everyday. Even if you're a grizzled vet. I think every coder
has reached a point where they didn't know how to solve an issue. How many are willing to admit it? How many people let it
affect their sleeping habits? Do you lay awake beating yourself up for not knowing how to fix a specific issue? Even worse:
did you fail in every way to address it? Did it cause you grief?
The good news is that if you've let a problem affect you to the point of losing sleep, you're probably one of the better
programmers among your peers, in a way. If you care enough about a problem to let it negatively affect you, not only does it
mean you care, it also means you're growing. It means you're a human. It means that it might have stumped y
@wmerfalen
wmerfalen / how-to-publish-to-npm.md
Created September 11, 2021 04:06 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "https:/yourblog.com"

npm adduser
@wmerfalen
wmerfalen / semantic-commit-messages.md
Created September 26, 2021 10:05 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@wmerfalen
wmerfalen / youtube-channel-scrape.js
Created September 26, 2021 11:20
Get all YouTube video URL's from a channel
/**
* Follow these instructions:
* 1) go to the channel in question
* 2) Click on Videos
* 3) Scroll down to the page until you can't scroll anymore
* 4) When you've reached the bottom, open the JS Console
* 5) Run this: It will print all video URls in the console
*/
document.querySelectorAll('a#thumbnail').forEach(v => console.log(v.href))