Skip to content

Instantly share code, notes, and snippets.


Petr im7mortal

View GitHub Profile
SaschaWillems / gist:47be6970a3e99a3d30e1
Last active September 26, 2018 22:09
Intel Vulkan Mesa on Ubuntu 15.10
View gist:47be6970a3e99a3d30e1
# Pre requisites
- Enable DRI3 as described in
- Install a library for SHA, e.g. sudo apt-get install libgcrypt11-dev (if not already present)
- Otherwise the driver may throw an error with "_mesa_sha1_compute" when loading SPIR-V shaders
# Building
- Clone Mesa Master : git clone git:// -b Master
- cd mesa
- autoreconf -vfi
- ./configure --with-dri-drivers=i965 --with-gallium-drivers= --with-sha1= --with-vulkan-drivers=intel
jackcarter /
Last active October 13, 2022 15:22
Delete Slack files older than 30 days. Rewrite of
import requests
import time
import json
token = ''
#Delete files older than this:
ts_to = int(time.time()) - 30 * 24 * 60 * 60
def list_files():
wangruohui / Caffe Ubuntu
Last active February 28, 2023 09:36
Compile and run Caffe on Ubuntu 15.10
View Caffe Ubuntu

Ubuntu 15.10 have been released for a couple of days. It is a bleeding-edge system coming with Linux kernel 4.2 and GCC 5. However, compiling and running Caffe on this new system is no longer as smooth as on earlier versions. I have done some research related to this issue and finally find a way out. I summarize it here in this short tutorial and I hope more people and enjoy this new system without breaking their works.

Install NVIDIA Driver

The latest NVIDIA driver is officially included in Ubuntu 15.10 repositories. One can install it directly via apt-get.

sudo apt-get install nvidia-352-updates nvidia-modprobe

The nvidia-modprobe utility is used to load NVIDIA kernel modules and create NVIDIA character device files automatically everytime your machine boots up.

Reboot your machine and verify everything works by issuing nvidia-smi or running deviceQuery in CUDA samples.

View docker-workflow-demo.groovy
node {
def maven32 = docker.image('maven:3.2-jdk-7-onbuild');
stage 'Mirror'
// First make sure the slave has this image.
// (If you could set your registry below to mirror Docker Hub,
// this would be unnecessary as maven32.inside would pull the image.)
// We are pushing to a private secure docker registry in this demo.
ota42y / least_squares_method.go
Created February 2, 2015 22:59
Golang least squares method
View least_squares_method.go
package main
import "fmt"
type Point struct {
x float64
y float64
func LeastSquaresMethod(points *[]Point) (a float64, b float64){
lelandbatey /
Last active March 20, 2023 12:27
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!


This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"


mandel59 / hello.go
Created October 14, 2012 07:31
Golang OpenGL Shader Example
View hello.go
// -*- coding: utf-8 -*-
// 参考: 床井研究室 - (4) シェーダの追加
package main
import (
gl ""
taichi /
Created April 27, 2012 11:02
example of java.nio.file.WatchService
package sandbox;
import static java.nio.file.StandardWatchEventKinds.ENTRY_CREATE;
import static java.nio.file.StandardWatchEventKinds.ENTRY_DELETE;
import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY;
import java.nio.file.ClosedWatchServiceException;
import java.nio.file.FileSystem;