Skip to content

Instantly share code, notes, and snippets.

View MatthiasWinkelmann's full-sized avatar

Matthias Winkelmann MatthiasWinkelmann

View GitHub Profile
@MatthiasWinkelmann
MatthiasWinkelmann / ramdisk.sh
Created January 24, 2018 16:24 — forked from rxin/ramdisk.sh
ramdisk create/delete on Mac OS X.
#!/bin/bash
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/
#
ARGS=2
E_BADARGS=99
if [ $# -ne $ARGS ] # correct number of arguments to the script;
then
@MatthiasWinkelmann
MatthiasWinkelmann / Tensorflow_Build_GPU.md
Last active May 20, 2019 15:21 — forked from smitshilu/Tensorflow_Build_GPU.md
Tensorflow 1.7 Mac OS Sierra 10.12 GPU Support

Tensorflow

System information

  • OS - Sierra 10.12
  • Tensorflow - 1.7.0
  • Xcode command line tools - 8.2 (Download from here: Xcode - Support - Apple Developer & Switch to different clang version: sudo xcode-select --switch/Library/Developer/CommandLineTools & check version: clang -v)
  • Cmake - 3.11
  • Bazel - 0.11.1
@MatthiasWinkelmann
MatthiasWinkelmann / redis.rb
Created May 11, 2016 18:24 — forked from pubis/redis.rb
Redis config and initialization for rails
#config/initializers/redis.rb
require 'redis'
require 'redis/objects'
REDIS_CONFIG = YAML.load( File.open( Rails.root.join("config/redis.yml") ) ).symbolize_keys
dflt = REDIS_CONFIG[:default].symbolize_keys
cnfg = dflt.merge(REDIS_CONFIG[Rails.env.to_sym].symbolize_keys) if REDIS_CONFIG[Rails.env.to_sym]
$redis = Redis.new(cnfg)
Redis::Objects.redis = $redis
@MatthiasWinkelmann
MatthiasWinkelmann / prime.c
Last active May 9, 2016 16:18 — forked from airspeedswift/prime.c
Swift vs C Prime Number Benchmark
// code originally adapted from https://github.com/DuncanMC/SwiftPerformanceBenchmark
#include <stdlib.h>
#include <stdio.h>
#include <CoreFoundation/CFDate.h>
void updateTotal(int newTotal, CFAbsoluteTime startTime) {
CFAbsoluteTime now = CFAbsoluteTimeGetCurrent();
CFAbsoluteTime totalTime = now - startTime;