Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
/* | |
Code to paste and run in the Browser Console | |
Requires devtools.chrome.enabled => true in about:config | |
Tested in Firefox 68.0.1 on Windows | |
*/ | |
// Create references to APIs we'll use | |
var ss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService); | |
var io = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); | |
var ds = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties); |
/* tlsprox - minimal tls MITM transparent proxy... in go! | |
* by @tam7t | |
* | |
* Usage: | |
* If we want to MITM https://example.com first get example.com's ip address | |
* then add localhost to /etc/hosts: | |
* | |
* 127.0.0.1 example.com | |
* | |
* > go build tlsprox.go |
19.11.2013 13.41.32,403 secd[540]: securityd_xpc_dictionary_handler Fantastical[1799] copy_matching The operation couldn’t be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements) | |
19.11.2013 13.41.32,403 Fantastical[1799]: SecOSStatusWith error:[-34018] The operation couldn’t be completed. (OSStatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements)) | |
19.11.2013 13.41.32,406 secd[540]: securityd_xpc_dictionary_handler Fantastical[1799] copy_matching The operation couldn’t be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements) | |
19.11.2013 13.41.32,406 Fantastical[1799]: SecOSStatusWith error:[-34018] The operation couldn’t be completed. (OSStatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (OSStatus error -34018 - client has neith |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
// | |
// RVNReceiptValidation.m | |
// | |
// Created by Satoshi Numata on 12/06/30. | |
// Copyright (c) 2012 Sazameki and Satoshi Numata, Ph.D. All rights reserved. | |
// | |
// This sample shows how to write the Mac App Store receipt validation code. | |
// Replace kRVNBundleID and kRVNBundleVersion with your own ones. | |
// | |
// This sample is provided because the coding sample found in "Validating Mac App Store Receipts" |
// compile using: clang -fobjc-arc -framework AppKit bundlelessApplication.m -o bundleLess | |
// | |
// opens a NSApplication with dock icon and menu bar. NSRunningApplication will return no bundleURL for it | |
// | |
// via http://stackoverflow.com/questions/8137538/cocoa-applications-from-the-command-line | |
// and http://casperbhansen.wordpress.com/2010/08/15/dev-tip-nibless-development/ | |
#import <Foundation/Foundation.h> | |
#import <Cocoa/Cocoa.h> |
// jQuery-like syntactic sugar. Only queries for one element. Does not loop over multiple like jQuery | |
function $(query) { | |
if (typeof query === 'undefined') throw 'No query provided to $'; | |
var el; | |
if (typeof query.nodeType === 'string') { | |
el = query; | |
} else if (typeof query === 'string' && query[0] === '<') { | |
const container = document.createElement('div'); | |
container.innerHTML = query; |
A collection of information about accessing raw MultiTouch events on MacOS.
#import <Foundation/Foundation.h> | |
typedef uint64_t CGSSpace; | |
typedef uint64_t CGSManagedDisplay; | |
typedef int CGSConnection; | |
typedef enum _CGSSpaceSelector { | |
kCGSSpaceCurrent = 5, | |
kCGSSpaceOther = 6, | |
kCGSSpaceAll = 7 |
I've put together these notes as I read about DHT's in depth and then learned how the libtorrent implementation based on the Kademlia paper actually works.
400,000,000,000
(400 billion stars), that's a 4 followed by 11 zeros.
The number of atoms in the universe is estimated to be around 10^82
.
A DHT with keys of 160 bits, can have 2^160
possible numbers, which is around 10^48