Skip to content

Instantly share code, notes, and snippets.

hmage

Block or report user

Report or block hmage

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View telegram-dns
#!/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'))
View ssim_perceptual_downscaling.c
// 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
@sk22
sk22 / lastfm-remove-duplicates.js
Last active Oct 12, 2019
Last.fm duplicate scrobble deleter
View lastfm-remove-duplicates.js
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()
})
@teknikqa
teknikqa / lastfm_delete_loved.js
Created May 7, 2017
Bulk delete Last.FM scrobbles & loved tracks
View lastfm_delete_loved.js
// On the Last.FM website go to the page which lists the tracks that you have loved.
// Open Chrome DevTools (or Firefox or any modern browser that has a built in Javacript Console)
// and run the following command.
// This basically clicks on all the delete buttons on the page and reloads the page.
jQuery('.love-button--loved').each(function(_, b) {
b.click();
});
location.reload();
@teknoraver
teknoraver / unixhttpc.go
Last active Oct 19, 2019
HTTP over Unix domain sockets in golang
View unixhttpc.go
package main
import (
"context"
"flag"
"fmt"
"io"
"net"
"net/http"
"os"
@joepie91
joepie91 / index.js
Last active Aug 11, 2019
Breaking CloudFlare's "I'm Under Attack" challenge
View index.js
'use strict';
const parseExpression = require("./parse-expression");
function findAll(regex, target) {
let results = [], match;
while (match = regex.exec(target)) {
results.push(match);
}
View 1080.md

Nvidia GTX 1080 Hashcat Benchmarks

Product: Sagitta Invictus (PN S2440X-GTX-1080)

Software: Hashcat 3.00-beta-116-g9a54829, Nvidia driver 367.18

Accelerator: 1x Nvidia GTX 1080 Founders Edition

Highlights

@chenshuo
chenshuo / khash.hpp
Last active Mar 5, 2019
khash in C++
View khash.hpp
#pragma once
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <type_traits>
typedef uint32_t khint_t;
typedef khint_t khiter_t;
@karpathy
karpathy / min-char-rnn.py
Last active Oct 22, 2019
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
View min-char-rnn.py
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@John07
John07 / HLS_to_mp4
Last active Oct 16, 2018
Save/record HTTP Live Stream (short HLS, the kind of live stream that can be played by iOS devices) to disk as mp4 file
View HLS_to_mp4
ffmpeg -re -i http://url.com/playlist.m3u8 -c copy -bsf:a aac_adtstoasc output.mp4
You can’t perform that action at this time.