Skip to content

Instantly share code, notes, and snippets.

@itkach
itkach / tezos-baking-howto.md
Created April 22, 2020 19:52 — forked from dakk/tezos-baking-howto.md
tezos-baking-howto.md

Tezos baking howto

This howto is valid for Betanet on Ubuntu or Debian

Setup

Prereq

You have to install some dependencies. In debian / ubuntu run:

@itkach
itkach / zerodark-mod.el
Last active April 11, 2018 02:36
modified flycheck stats display for zerodark theme
(defun zerodark-flycheck-mk-icon (name face)
"Create icon for flycheck stats.
NAME - name of the font awesome icon in all-the-icons
FACE - symbol for theme face to use on the icon"
(all-the-icons-faicon name
:height 0.9
:v-adjust 0
:face (if (zerodark--active-window-p)
face 'mode-line-inactive)))
function mhg () {
start_time=`date +%s`
for i in `find . -maxdepth 2 -name .hg -type d `;
do
d=$(dirname $i);
echo "--- $d: $*";
hg -R $d $*;
done
end_time=`date +%s`
echo execution time was `expr $end_time - $start_time` s.

Desktop (Chrome 40, 64-bit Ubuntu 14.04)

MathJax 2.4: v2.4-latest branch MathJax 2.5: master branch 55df93cdf8eb

enwiki.mj25.svg.slob

Run 1

ArticleTime (ms)

MathJax 2.5

Absolutely integrable

desktop

[MATHJAX] SVG: done in 5822 [MATHJAX] SVG with preview: done in 8537 [MATHJAX] HTML-CSS: done in 13121 [MATHJAX] HTML-CSS with preview: done in 13042

simplewiki-20140209.aar
-----------------------
lxml:
Finished adding content in 619.53s
Finalizing...
Sorting... sorted in 11.27s
Resolving aliases...
Sorting... sorted in 17.90s
Resolved aliases in 322.40s
diff --git a/client/xhr.js b/client/xhr.js
index 223358d..b53143e 100644
--- a/client/xhr.js
+++ b/client/xhr.js
@@ -113,6 +113,12 @@
response.headers = parseHeaders(client.getAllResponseHeaders());
response.entity = client.responseText;
+ if (response.status.code === 0) {
+ if (/^file:\/\//i.test(url)) {
@itkach
itkach / caller_class_name.py
Created March 14, 2013 22:27
find caller's class name
import inspect
class A(object):
def __call__(self):
stack = inspect.stack()
frame = stack[1][0]
caller = frame.f_locals.get('self', None)
print type(caller).__name__ if caller else None
@itkach
itkach / asciify.py
Last active December 14, 2015 09:29
Strip diacritics
# -*- coding: utf-8 -*-
def asciify(us):
"""
>>> us = "Ňóƫė".decode('utf-8')
>>> asciify(us)
u'Note'
"""
result = []
@itkach
itkach / poke-php.sh
Created December 13, 2012 21:06
Script to poke PHP from command line via php-cgi
#! /bin/bash -x
export SCRIPT_FILENAME=$1
export SCRIPT_NAME="$2"
export PATH_INFO="$3"
export DOCUMENT_ROOT='/'
export REQUEST_URI="${SCRIPT_NAME}/${PATH_INFO}"
export GATEWAY_INTERFACE='CGI/1.1'
export REDIRECT_STATUS="-"
php-cgi