Skip to content

Instantly share code, notes, and snippets.

@hotab
hotab / gist:b78df993870fcdf884adf2c0cd401c5e
Last active October 8, 2018 13:39
MySQL decode strings to chars
Tested with: MySQL 5.7.17-0ubuntu0.16.04.1
You can use these to build arb strings using only numbers and sql functions (like concat, insert...):
d = {'\x0c': 'decode(0,436)', ' ': 'decode(0,411)', '$': 'decode(0,21)', '(': 'decode(0,178)', ',': 'decode(0,372)', '0': 'decode(0,12)', '4': 'decode(0,158)', '8': 'decode(0,133)', '<': 'decode(0,371)', '@': 'decode(0,81)', 'D': 'decode(0,115)', 'H': 'decode(0,194)', 'L': 'decode(0,53)', 'P': 'decode(0,161)', 'T': 'decode(0,29)', 'X': 'decode(0,7)', '\\': 'decode(0,197)', '`': 'decode(0,1028)', 'd': 'decode(0,727)', 'h': 'decode(0,246)', 'l': 'decode(0,780)', 'p': 'decode(0,78)', 't': 'decode(0,285)', 'x': 'decode(0,71)', '|': 'decode(0,52)', '\x0b': 'decode(0,142)', '#': 'decode(0,100)', "'": 'decode(0,47)', '+': 'decode(0,129)', '/': 'decode(0,599)', '3': 'decode(0,511)', '7': 'decode(0,218)', ';': 'decode(0,116)', '?': 'decode(0,879)', 'C': 'decode(0,505)', 'G': 'decode(0,48)', 'K': 'decode(0,30)', 'O': 'decode(0,18)', 'S': 'decode(0,295)', 'W': 'decode(0,77)',
@hotab
hotab / Gruntfile.js
Created March 30, 2016 10:06
Gruntfile that is used in lunapps.com building process
/**
* lunapps.com's Gruntfile
*/
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-jade');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-copy');
import requests
import thread
import mutex
import time
hsh = "00000000000000000000000000000000"
ltrs = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f']
ln = 0
while ln != 32:
iter = 0
function resp()
{
iter++;
setTimeout(function() {
$.ajax({
url: '/register',
method: 'post',
data: {
### Keybase proof
I hereby claim:
* I am hotab on github.
* I am hotab (https://keybase.io/hotab) on keybase.
* I have a public key whose fingerprint is 7A08 89E1 C129 3AD2 9D72 B600 0A12 0421 F71C DEFC
To claim this, I am signing this object:
@hotab
hotab / ssl_config.conf
Last active August 29, 2015 14:17
nginx configuration for security
# Tested this config with nginx 1.6.2 and openssl 1.0.1e on CentOS 6.5 and 7.
# Cerificate and private key.
ssl_certificate certificate_file;
ssl_certificate_key key_file;
# http://prosody.im/doc/advanced_ssl_config
# Generate this parameter (for Diffie–Hellman key exchange) to ensure better security for EDH. For example - like this: openssl dhparam -out dhparam.pem 2048
ssl_dhparam dhparam.pem;
# SSL session caching