Skip to content

Instantly share code, notes, and snippets.

View fnurl's full-sized avatar

Jody Foo fnurl

  • Linköping University
  • Linköping, Sweden
View GitHub Profile
Options +FollowSymlinks
RewriteEngine on
# No intersticial for direct reference and self-reference
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://box.leebyron.com/.*$ [NC]
# Add a line item for every website you don't need an intersticial for
# I've added my own website, gmail and facebook
RewriteCond %{HTTP_REFERER} !^http(s)?://([^\.]*.)?leebyron.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://mail.google.com/.*$ [NC]
#!/usr/bin/env ruby -rjcode -Ku
# TaskPaper to Markdown converter
# Usage: tp2md.rb filename.taskpaper > output.md
require 'ftools'
infile = ARGV[0]
title = File.basename(infile,'.taskpaper').upcase
output = "# #{title} #\n\n"
prevlevel = 0
begin
@gsong
gsong / net.damacy.releasemem.plist
Created March 17, 2012 18:02
LaunchAgent to release inactive memory on OS X 10.7
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.damacy.releasemem</string>
<key>ProgramArguments</key>
<array>
<string>/Users/george/.bin/releasemem.py</string>
</array>
@fwenzel
fwenzel / minecraft_64bitify.sh
Created March 18, 2012 21:32
Switch out Minecraft's Java Application Stub on OSX Lion and force 64bit mode.
#!/bin/sh
# Thank you, StackExchange: http://gaming.stackexchange.com/questions/44822/64-bit-java-not-recognized-in-minecraft
gzip /Applications/Minecraft.app/Contents/MacOS/JavaApplicationStub # save a backup
cp /System/Library/Frameworks/JavaVM.framework/Versions/Current/Resources/MacOS/JavaApplicationStub /Applications/Minecraft.app/Contents/MacOS/
/usr/libexec/PlistBuddy -c "Add :Java:JVMArchs:0 string 'x86_64'" /Applications/Minecraft.app/Contents/Info.plist
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 9, 2024 10:41
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@deepak
deepak / pyg
Created March 20, 2014 02:05
script to create RTF for code snippets to paste in keynote presentations using pygments
#!/bin/bash
# /usr/local/bin/pygmentize -f rtf -O "style=friendly,fontface=Courier Bold" "$1" | pbcopy
# /usr/local/bin/pygmentize -l ruby -f rtf -P style=presentation -P fontface="Source Code Pro" "$1" | pbcopy
/usr/local/bin/pygmentize -l ruby -f rtf -O "style=friendly,fontface=Source Code Pro" "$1" |
# Set the font size to 36pt (that's the \fs72 - RTF font sizes work in doubles)
sed "s/\\\\f0/\\\\f0\\\\fs72/g" |
# And copy. Enjoy!
@lucc
lucc / lbdb.mk
Created December 30, 2016 09:21
Small wrapper for fast address lookup in mutt/alot/... of the addresses in khard and gpg keyring,
#!/usr/bin/make -f
# A rewimplementation of the idea of lbdb in as a make file.
CACHE = ~/.cache/lbdb
SHARE = \
/usr/share \
/usr/local/share \
~/.local/share
@nicinabox
nicinabox / lets split build guide.md
Last active January 28, 2023 04:10
This guide covers building a Let's Split v2.

This guide has moved

To improve collaboration this guide is now available on GitHub.

Continue reading

@csswizardry
csswizardry / README.md
Last active April 2, 2024 20:17
Vim without NERD tree or CtrlP

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vs **/*<partial file name><Tab>
@venik
venik / build_tf.sh
Last active February 22, 2024 06:12
Bash script for local building TensorFlow on Mac/Linux with all CPU optimizations (default pip package has only SSE)
#!/usr/bin/env bash
# Author: Sasha Nikiforov
# source of inspiration
# https://stackoverflow.com/questions/41293077/how-to-compile-tensorflow-with-sse4-2-and-avx-instructions
# Detect platform
if [ "$(uname)" == "Darwin" ]; then
# MacOS