Skip to content

Instantly share code, notes, and snippets.

View nanoant's full-sized avatar

Adam Strzelecki nanoant

View GitHub Profile
@nanoant
nanoant / fl
Last active October 8, 2015 09:38
Open folder in ForkLift.app from console
#!/bin/bash
#
# Open folder in ForkLift.app from console
# Author: Adam Strzelecki nanoant.com
#
# Usage:
# fl [<folder>]
#
# Opens specified directory or current working directory in ForkLift.app
#
@nanoant
nanoant / test.c
Created June 29, 2012 17:23
Parallels for Mac 7 having problem with ICC AVX optimized code
/*
Now let's try compile and benchmark it:
$ icc -v
icc version 13.0.0 (gcc version 4.6.0 compatibility)
Let's try without AVX set (just up to SSE4.2):
$ icc -march=corei7 test.c -lm && time ./a.out
r=171828183.102
import macros
# macro dump(st: stmt): stmt =
# echo st.treeRepr
macro dump(ex: expr): expr =
echo ex.treeRepr
ex
proc test() {.dump.} =
@nanoant
nanoant / deadstore.nim
Created May 27, 2015 13:36
deadstore.nim
{.deadCodeElim: on.}
proc getValue(): int {.inline, noSideEffect.} =
debugEcho "got 1"
result = 1
let x = getValue()
let y = getValue()
echo y
#!/bin/bash
exec cmake -GNinja "$HOME/llvm" \
-DCMAKE_AR=$HOME/osxcross/target/bin/x86_64-apple-darwin13-ar \
-DCMAKE_C_COMPILER=$HOME/osxcross/target/bin/x86_64-apple-darwin13-clang \
-DCMAKE_CXX_COMPILER=$HOME/osxcross/target/bin/x86_64-apple-darwin13-clang++ \
-DLLVM_ENABLE_LIBCXX:BOOL=ON \
-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-apple-darwin13 \
-DLLVM_TARGET_ARCH=x86_64 \
-DCMAKE_CROSSCOMPILING:BOOL=ON \
-DLLVM_TABLEGEN=/usr/bin/llvm-tblgen-3.6 \
@nanoant
nanoant / dmg.sh
Created September 16, 2014 23:02
DMG builder script
#!/bin/bash
# set -e
#
# Builds .dmg installer
#
# Copyright (C) 2013-2014 Adam Strzelecki
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@nanoant
nanoant / gitlab-README-default.patch
Created February 12, 2014 10:36
Show README on project entry in GitLab
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index 59075ab..c2af1b1 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -2,10 +2,16 @@
.row
.col-md-9
- = render "events/event_last_push", event: @last_push
- = render 'shared/event_filter'