Skip to content

Instantly share code, notes, and snippets.

Avatar

Harold Thétiot hthetiot

View GitHub Profile
View buildex.rb
#!/usr/bin/ruby
# vim: fileencoding=utf-8
require 'rubygems'
require 'zipruby'
require 'openssl'
require 'digest/sha1'
require 'optparse'
require 'fileutils'
require 'find'
View gist:1675794
function getCommonDomain($domainA, $domainB) {
$domainAParts = explode('.', $domainA);
$domainBParts = explode('.', $domainB);
$domainC = false;
$domainTmp = false;
foreach ($domainBParts as $domainBPart) {
@hthetiot
hthetiot / require-cfg.js
Created Mar 13, 2016
EasyRTC requireJS
View require-cfg.js
/* global window, require */
require.config({
waitSeconds: 60,
paths: {
easyrtc: '../bower_components/easyrtc/api/easyrtc',
socketio: '../bower_components/socket.io-client/socket.io'
},
View gist:21d3c315ede1e562beceb65492fdf809
/*global define:false, console, self */
// https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features
// https://developers.google.com/web/fundamentals/engage-and-retain/push-notifications/permissions-subscriptions
// https://github.com/w3c/ServiceWorker/blob/master/explainer.md
// chrome://inspect/#service-workers
// https://serviceworke.rs
function log(msg, obj) {
console.log('ServiceWorker', msg);
View output.log
Reading 40 bytes:
Reading at malicious_x = 0xfffffffffffffebe... Unclear: 0x54=’T’ score=994 (second best: 0x02 score=894)
Reading at malicious_x = 0xfffffffffffffebf... Unclear: 0x68=’h’ score=999 (second best: 0x02 score=916)
Reading at malicious_x = 0xfffffffffffffec0... Unclear: 0x65=’e’ score=986 (second best: 0x02 score=758)
Reading at malicious_x = 0xfffffffffffffec1... Unclear: 0x20=’ ’ score=935 (second best: 0x02 score=714)
Reading at malicious_x = 0xfffffffffffffec2... Unclear: 0x4D=’M’ score=953 (second best: 0x02 score=888)
Reading at malicious_x = 0xfffffffffffffec3... Unclear: 0x61=’a’ score=964 (second best: 0x02 score=883)
Reading at malicious_x = 0xfffffffffffffec4... Success: 0x67=’g’ score=2
Reading at malicious_x = 0xfffffffffffffec5... Unclear: 0x69=’i’ score=954 (second best: 0x02 score=907)
Reading at malicious_x = 0xfffffffffffffec6... Unclear: 0x63=’c’ score=942 (second best: 0x02 score=867)
@hthetiot
hthetiot / index.html
Created May 30, 2018 — forked from nolanlawson/index.html
Create an image/png blob, then fetch it with XHR
View index.html
<html>
<body>
<h1>Create an image/png blob, then fetch it with XHR</h1>
<pre id="display"></pre>
<script src="index.js"></script>
</body>
</html>
@hthetiot
hthetiot / index.js
Last active Jun 27, 2018
Diffie Hellman JavaScript
View index.js
const BN = require('bn.js');
var USE_BINARY = true;
var UNIQUE_PRIME = true;
var MIN_INTEGER = 100;
var MAX_INTEGER = 40000; //Number.MAX_SAFE_INTEGER;
// https://jsperf.com/prime-numbers/7
function number(p) {
View cert.sh
#!/bin/bash
# Bash shell script for generating self-signed certs. Run this in a folder, as it
# generates a few files. Large portions of this script were taken from the
# following artcile:
#
# http://usrportage.de/archives/919-Batch-generating-SSL-certificates.html
#
# Additional alterations by: Brad Landers
# Date: 2012-01-27
View 1.js
(function() {
var z = "";
var b = "766172205f3078613539623d5b275c7835385c7836395c7835395c7835375c7836355c7834645c7834625c7833335c7835335c7837335c7834665c7834345c7837375c7837305c7832665c7834345c7836635c7836625c7833315c7836345c7837375c7833355c7833335c7834335c7836625c7833385c7834625c7836635c7834635c7837335c7834625c7837365c7837375c7836665c7834315c783364272c275c7834655c7834645c7834625c7834395c7837375c7837305c7837345c7835305c7837375c7836665c7835355c7834615c7837375c7833345c7835385c7834335c7836665c7834645c7834665c7834355c7837375c7837305c7836655c7834345c7837305c7836645c7834385c7834335c7836375c7833385c7834665c7836655c7837375c7836665c7836615c7834345c7836395c7836615c7835355c7834315c7837375c7837325c7836365c7834335c7837365c7833385c7834625c7836345c7837375c7837315c7837615c7834335c7837315c7836385c7834315c7834615c7837375c7836665c7835345c7834345c7836665c7837375c7833645c783364272c275c7837375c7837315c7832665c7834335c7837305c7834645c7834625c7837615c7834385c7837335c7834625c783531272c275c7837375c7836665c7837305c7837365c78373
You can’t perform that action at this time.