Skip to content

Instantly share code, notes, and snippets.

View zbeekman's full-sized avatar
🏢
New Office, still neck deep in code

Izaak "Zaak" Beekman zbeekman

🏢
New Office, still neck deep in code
View GitHub Profile
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
COLOR_NONE="\[\e[0m\]"
(require 'iimage)
(autoload 'iimage-mode "iimage" "Support Inline image minor mode." t)
(autoload 'turn-on-iimage-mode "iimage" "Turn on Inline image minor mode." t)
(add-to-list 'iimage-mode-image-regex-alist '("@startuml\s+\\(.+\\)" . 1))
;; Rendering plantuml
(defun plantuml-render-buffer ()
(interactive)
(message "PLANTUML Start rendering")
(shell-command (concat "java -jar ~/Downloads/plantuml.jar "
@zed
zed / .gitignore
Created January 17, 2011 16:08
What is faster x**.5 or math.sqrt(x) in Python?
.tox/
/MANIFEST
@jesstess
jesstess / cpu_cache_info.txt
Created January 27, 2011 01:18
CPU cache level, type, size, cache line size, associativity.
for path in /sys/devices/system/cpu/cpu*/cache/index*/
do
echo $path;
echo -n "Level: "; cat $path/level;
echo -n "Type: "; cat $path/type;
echo -n "Size: "; cat $path/size;
echo -n "Cache line size: "; cat $path/coherency_line_size;
echo -n "Associativity: "; cat $path/ways_of_associativity;
done
@lenary
lenary / gitconfig.ini
Created February 18, 2011 01:21
a special excerpt of my gitconfig
$ git clone github:lenary/guides.git
Cloning into guides...
remote: Counting objects: 255, done.
remote: Compressing objects: 100% (216/216), done.
remote: Total 255 (delta 111), reused 163 (delta 35)
Receiving objects: 100% (255/255), 1.49 MiB | 564 KiB/s, done.
Resolving deltas: 100% (111/111), done.
$ cd guides
$ git remote -v
@joeyadams
joeyadams / million-random-lines.c
Created April 19, 2011 20:05
Benchmarking data for line sorting
/*
* Generate 1,000,000 lines of pseudorandom text.
* Each line matches ([\x20-\x7E]|[\xA0-\xFF]){0,127}\n
*
* sha256sum of output:
* 64a9d302d9fc1d0dc9d351c706153dfdd7821182ac8c3d7ed5581850c13ae240
*
* sha256sum of output, sorted with LC_ALL=C sort :
* 6e1e5b2cdb848c02c304d08c565dbd34d394b5ee322019098e10a5b7210f314b
*/
@Palmr
Palmr / ascii.php
Created November 4, 2011 15:57
Image to ascii art converter (not great)
<?php
if(!isset($_GET['pure'])){
?>
<style>
pre {
line-height: 11px;
font-family:"Courier New", Courier, monospace;
}
#error {
font-family: Arial, Helvetica, sans-serif;
@StanAngeloff
StanAngeloff / simple-imagediff.py
Created February 1, 2012 11:45
Simple Image Diff for Git
#!/usr/bin/env python
# Simple Image Diffs
# ==================
#
# How to Install
# --------------
#
# Download the script somewhere on $PATH as 'simple-imagediff' with +x:
#
@datagrok
datagrok / gist:2199506
Last active April 8, 2023 17:36
Virtualenv's `bin/activate` is Doing It Wrong
@alexott
alexott / ctest2junix.xsl
Created April 11, 2012 11:09
XSL stylesheet to transform CTest results into JUnit format to import into Jenkins
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/Site">
<testsuite>
<xsl:variable name="BuildName"><xsl:value-of select="@BuildName"/></xsl:variable>
<xsl:variable name="BuildStamp"><xsl:value-of select="@BuildStamp"/></xsl:variable>
<xsl:variable name="Name"><xsl:value-of select="@Name"/></xsl:variable>
<xsl:variable name="Generator"><xsl:value-of select="@Generator"/></xsl:variable>
<xsl:variable name="CompilerName"><xsl:value-of select="@CompilerName"/></xsl:variable>