Skip to content

Instantly share code, notes, and snippets.

View herrbischoff's full-sized avatar

Marcel Bischoff herrbischoff

View GitHub Profile
This file has been truncated, but you can view the full file.
=>> Building lang/pocl
build started at Fri Dec 15 15:33:31 CET 2017
port directory: /usr/ports/lang/pocl
package name: pocl-0.14
building for: FreeBSD build 11.1-RELEASE-p5 FreeBSD 11.1-RELEASE-p5 amd64
maintained by: [email protected]
Makefile ident: $FreeBSD: head/lang/pocl/Makefile 440691 2017-05-12 17:08:26Z rezny $
Poudriere version: 3.2.99.20171204_1
Host OSVERSION: 1101001
Jail OSVERSION: 1101001
@herrbischoff
herrbischoff / vim.sh
Created August 21, 2015 23:23
Compile sane Vim from source on Linux
aptitude remove vim vim-runtime gvim
aptitude build-dep vim
git clone https://github.com/vim/vim.git
cd vim/src
./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp \
--enable-pythoninterp \
--with-python-config-dir=/usr/lib/python2.7/config \
--enable-perlinterp \
@herrbischoff
herrbischoff / nginx.conf
Created July 13, 2015 10:13
Set nginx default site to "Gone". Avoids always serving the lexicographically first site in the nginx config stack.
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 410;
log_not_found off;
}
@herrbischoff
herrbischoff / vim.applescript
Last active August 29, 2015 14:23
Open shell NeoVim in iTerm on double-clicking files
on run {input, parameters}
if (count of input) > 0 then
tell application "System Events"
set runs to false
try
set p to application process "iTerm"
set runs to true
end try
end tell
tell application "iTerm"
@herrbischoff
herrbischoff / new_gist_file.sh
Created June 12, 2015 18:08
Mac OS X: Find out what application is running on what port
sudo lsof -i :80
@herrbischoff
herrbischoff / new_gist_file.sh
Last active December 21, 2018 14:43
Install MacVim via Homebrew with Lua and Python
brew install macvim --HEAD --with-cscope --with-lua --override-system-vim --with-luajit --with-python
@herrbischoff
herrbischoff / .vimrc
Created April 29, 2015 16:38
Emmet tab completion in vim
imap <expr> <tab> emmet#expandAbbrIntelligent("\<tab>")
@herrbischoff
herrbischoff / replace.sh
Created April 21, 2015 17:07
Multiline sed replace
sed -n '1h;1!H;${g;s/search/replace/;p;}'
@herrbischoff
herrbischoff / pagerank.php
Last active August 29, 2015 14:19
Output Google Pagerank
<?php
function genhash ($url) {
$hash = "Mining PageRank is AGAINST GOOGLE'S TERMS OF SERVICE. Yes, I'm talking to you, scammer.";
$c = 16909125;
$length = strlen($url);
$hashpieces = str_split($hash);
$urlpieces = str_split($url);
for ($d = 0; $d < $length; $d++) {
$c = $c ^ (ord($hashpieces[$d]) ^ ord($urlpieces[$d]));