This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This file is now hosted here: | |
https://github.com/victornpb/undiscord | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <gd.h> | |
#include <stdio.h> | |
#include <string.h> | |
void process(gdImagePtr img) { | |
for (int j = 0; j < img->sy/2; j++) { | |
for (int i = 0; i < img->sx; i++) { | |
int top = gdImageGetPixel(img, i, j*2 ); | |
int bottom = gdImageGetPixel(img, i, j*2 + 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2023 Russell Harmon | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AngularJS Injector | |
// @namespace http://joshkra.me/ | |
// @version 0.1 | |
// @description Binds $inject method to window | |
// @author jkjustjoshing | |
// @match *://*/* | |
// ==/UserScript== | |
// This userscript creates an $inject() method on the window object that can be used to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
// See MDN: https://developer.mozilla.org/en-US/docs/DOM/MutationObserver?redirectlocale=en-US&redirectslug=DOM%2FDOM_Mutation_Observers | |
(function(){ | |
// select the target node | |
var target = document.querySelector('body'); | |
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; | |
var i={}; | |
// create an observer instance | |
var observer = new MutationObserver(function(mutations) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// encode(decode) html text into html entity | |
var decodeHtmlEntity = function(str) { | |
return str.replace(/&#(\d+);/g, function(match, dec) { | |
return String.fromCharCode(dec); | |
}); | |
}; | |
var encodeHtmlEntity = function(str) { | |
var buf = []; | |
for (var i=str.length-1;i>=0;i--) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |