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
var elements = Array.from(document.querySelectorAll('.js-link-block')) | |
elements.map(function (element) { | |
var nameElement = element.querySelector('.chartlist-name') | |
return nameElement && nameElement.textContent.replace(/\s+/g, ' ').trim() | |
}).forEach(function (name, i, names) { | |
if (name !== names[i + 1]) return | |
var deleteButton = elements[i].querySelector('[data-ajax-form-sets-state="deleted"]') | |
if (deleteButton) deleteButton.click() | |
location.reload() | |
}) |
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 is two times as fast when compiled with -Ofast | |
// see https://graphics.ethz.ch/~cengizo/Files/Sig15PerceptualDownscaling.pdf | |
#include <stdlib.h> // malloc, EXIT_* | |
#include <string.h> // memset | |
#include <math.h> | |
#include <png.h> | |
#define SQR_NP 2 // squareroot of the patch size, recommended: 2 |
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
#!/usr/bin/env ruby | |
require 'base64' | |
require 'openssl' | |
require 'net/http' | |
require 'ipaddr' | |
require 'json' | |
def handle_response(body) | |
raw = Base64.decode64(body) | |
rsa_key = OpenSSL::PKey::RSA.new(File.read('public_key.pem')) |
OlderNewer