Skip to content

Instantly share code, notes, and snippets.

View overheadhunter's full-sized avatar
🇺🇦

Sebastian Stenzel overheadhunter

🇺🇦
View GitHub Profile
@overheadhunter
overheadhunter / osxUtilities
Created October 5, 2014 17:10
Useful stuff for OS X for techies (will grow over time)
# System tweaks
## Quicklook
* Markdown preview: http://inkmarkapp.com/markdown-quick-look-plugin-mac-os-x/
@overheadhunter
overheadhunter / owncloudInSubdirectory.conf
Created October 21, 2014 07:05
For ownCloud installations on example.com/owncloud instead of a own subdomain.
location /owncloud/ {
error_page 403 = /owncloud/core/templates/403.php;
error_page 404 = /owncloud/core/templates/404.php;
client_max_body_size 0;
proxy_buffering off;
rewrite ^/owncloud/caldav(.*)$ /owncloud/remote.php/caldav$1 redirect;
rewrite ^/owncloud/carddav(.*)$ /owncloud/remote.php/carddav$1 redirect;
rewrite ^/owncloud/webdav(.*)$ /owncloud/remote.php/webdav$1 redirect;
@overheadhunter
overheadhunter / clang-omp-xcode.md
Last active August 29, 2015 14:18
Using clang-omp with Xcode
  1. Install clang-omp using homebrew: brew install clang-omp
  2. Create a new Xcode project.
  3. Under Build Settings
    • add a new user-defined setting CC with the value /usr/local/bin/clang-omp
    • Add -fopenmp to Other C Flags
    • Add /usr/local/include to Header Search Paths
    • Set Enable Modules (C and Objective-C) to No
  4. Under Build Phases
    • Add /usr/local/lib/libiomp5.dylib to Link Binary With Libraries
@overheadhunter
overheadhunter / maven-daggerfx.log
Created August 8, 2015 21:32
mvn clean compile -X (Using Maven 3.3.1)
Apache Maven 3.3.1 (cab6659f9874fa96462afef40fcf6bc033d58c1c; 2015-03-13T21:10:27+01:00)
Maven home: /usr/local/Cellar/maven/3.3.1/libexec
Java version: 1.8.0_51, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "mac os x", version: "10.10.4", arch: "x86_64", family: "mac"
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG] Imported: javax.enterprise.inject.* < plexus.core
[DEBUG] Imported: javax.enterprise.util.* < plexus.core
@overheadhunter
overheadhunter / AesBenchmark.java
Created November 8, 2015 00:03
Benchmarking GCM vs CTR+HMAC in Java
import java.nio.ByteBuffer;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
@overheadhunter
overheadhunter / cheatingBad.js
Created October 17, 2013 19:23
for all the script kiddies out there, who can't wait for the $1,632,501,000,000 needed
var sayMyName = function(batches) {
var sale = do_sell(batches);
if(sale) {
message('Heisenberg!!!');
pd.stats.hand_sold_widgets += sale;
fix_make_sell();
return sale;
}
}
@overheadhunter
overheadhunter / launcher.cpp
Last active May 10, 2016 10:50
Linux JavaFX Launcher with fixed GetProgramPath()
/*
* Copyright (c) 2014, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*

Keybase proof

I hereby claim:

  • I am overheadhunter on github.
  • I am overheadhunter (https://keybase.io/overheadhunter) on keybase.
  • I have a public key whose fingerprint is CBC2 460B 7BB8 F9E6 54F5 DDBC 667B 866E A824 0A09

To claim this, I am signing this object:

@overheadhunter
overheadhunter / Dockerfile
Last active July 12, 2017 18:16
Discourse 1.8.3 Dockerfile
FROM ruby:2.4
WORKDIR /usr/src/app
ENV RAILS_ENV=production \
RUBY_GC_MALLOC_LIMIT=90000000 \
RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 \
DISCOURSE_DB_HOST=postgres \
DISCOURSE_REDIS_HOST=redis \
DISCOURSE_SERVE_STATIC_ASSETS=true