Skip to content

Instantly share code, notes, and snippets.

View AndiH's full-sized avatar
🤖
q|^_^|p

Andreas Herten AndiH

🤖
q|^_^|p
View GitHub Profile
@nadavrot
nadavrot / Matrix.md
Last active April 2, 2024 06:45
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@stefangrund
stefangrund / opengraph.php
Created August 20, 2014 08:18
This is the OpenGraph and Twitter Card implementation for my WordPress blog (http://eay.cc/) to display nice previews and pictures in Facebook and Twitter.
<?php
//Get first image in post
function firstImage() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$content = do_shortcode( $post->post_content );
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $content, $matches);
$first_img = $matches [1] [0];
@Nepomuk
Nepomuk / encfs_login.sh
Last active August 29, 2015 14:05
Mount a encfs/boxcryptor image with OSX and let it display as a local mount in finder.
#!/bin/bash
ENCFS="/usr/local/bin/encfs"
ENCDIR="$HOME/Dropbox/Boxcryptor.bcc"
DECDIR="/Volumes/Boxcryptor"
if [ ! -d "$DECDIR" ]; then
mkdir -p $DECDIR
fi
@fndari
fndari / setCustomStyle.C
Created April 30, 2014 08:40
Some of the stuff I'm trying to make working with ROOT a marginally less painful experience.
void setCustomStyle()
{
TStyle* customStyle = new TStyle("customStyle", "customStyle");
customStyle->SetDrawBorder(0);
customStyle->SetCanvasBorderMode(0);
customStyle->SetFrameBorderMode(0);
customStyle->SetPadBorderMode(0);
customStyle->SetPalette(1,0); // avoid horrible default color scheme
@ax3l
ax3l / CUDA_Compilers.md
Last active April 8, 2024 09:57
CUDA Compilers
@garvinhicking
garvinhicking / gist:7823333
Created December 6, 2013 12:57
Quick and dirty IMDB comparison
<?php
$myself = 'garvin';
$compare = 'andih';
# Usage:
# - wget a URL like this:
# http://www.imdb.com/list/export?list_id=ratings&author_id=ur0555872 (garvin)
# - save it as imdb_ratings_XXX.csv (see below when it gets called)
# - do the same with the CSV of the second user you want to compare with
# - enter the proper user names/file names at the bottom of this file
@bjmorgan
bjmorgan / Bibtex.sublime-build
Created December 20, 2012 23:30 — forked from dpo/BibTeX.sublime-build
Build files, keymap entries, and `run_latex_build.py` plugin for adding the option for running bibtex and cleaning up auxiliary files for LaTeX in Sublime Text 2. Added the ability to run bibtex, and changed key bindings.
{
"cmd": ["bibtex", "$file_base_name"],
"path": "$PATH:/usr/texbin:/usr/local/bin",
"file_regex": "^(...*?):([0-9]+): ([0-9]*)([^\\.]+)",
"selector": "text.tex.latex"
}