A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
# thanks to tanaydin < github.com/tanaydin > | |
# set locales for system | |
export LANGUAGE="en_US:en" | |
export LC_ALL="en_US.UTF-8" | |
sudo locale-gen en.UTF-8 | |
sudo dpkg-reconfigure locales | |
echo "LANGUAGE=\"en_US:en\"" | sudo tee --append /etc/default/locale | |
echo "LC_ALL=\"en_US.UTF-8\"" | sudo tee --append /etc/default/locale |
The MIT License (MIT) | |
Copyright (c) 2015 Justin Perry | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
the Software, and to permit persons to whom the Software is furnished to do so, | |
subject to the following conditions: |
package main | |
import ( | |
"log" | |
"net/http" | |
"net/http/httputil" | |
) | |
func main() { | |
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { |
def miller_rabin(n, k): | |
# Implementation uses the Miller-Rabin Primality Test | |
# The optimal number of rounds for this test is 40 | |
# See http://stackoverflow.com/questions/6325576/how-many-iterations-of-rabin-miller-should-i-use-for-cryptographic-safe-primes | |
# for justification | |
# If number is even, it's a composite number | |
if n == 2: |
<?php | |
$ip = '127.0.0.1'; | |
$port = '9051'; | |
$auth = 'PASSWORD'; | |
$command = 'signal NEWNYM'; | |
$fp = fsockopen($ip,$port,$error_number,$err_string,10); | |
if(!$fp) { echo "ERROR: $error_number : $err_string"; | |
return false; |
(function($) { | |
var originalXhr = $.ajaxSettings.xhr; | |
$.ajaxSetup({ | |
progress: $.noop, | |
xhr: function() { | |
var req = originalXhr(), that = this; | |
if (req) { | |
if (typeof req.addEventListener == "function") { | |
req.addEventListener("progress", function(evt) { | |
that.progress(evt); |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
/*********************************************************************************************************************** | |
*********************************************************************************************************************** | |
* CONTENTS: | |
* Native Object | |
* Object Literal | |
* Basic Object | |
* Psuedo-Class | |
* Self Executing/Invoking Structure | |
* Lazy Function | |
* Module Pattern |
# Basics of Elliptic Curve Cryptography implementation on Python | |
import collections | |
def inv(n, q): | |
"""div on PN modulo a/b mod q as a * inv(b, q) mod q | |
>>> assert n * inv(n, q) % q == 1 | |
""" | |
for i in range(q): | |
if (n * i) % q == 1: |