Skip to content

Instantly share code, notes, and snippets.

View RGreinacher's full-sized avatar

Robert Spang RGreinacher

  • TU Berlin / 3antworten
  • Berlin
View GitHub Profile
@RGreinacher
RGreinacher / maketexpdf.sh
Created February 7, 2016 13:09
Create PDF from a .tex file
#!/bin/bash
#title :makepdf.sh
#description :This script (double) compiles a tex file into a pdf and cleans up everything afterwards.
#author :Arik Grahl, Robert Greinacher
#date :2014-07-18
#version :0.1
#usage :bash makepdf.sh FILENAME.TEX
#notes :Install latex, pdflatex to use this script. The one liner ca be used in e.g. your .vimrc to automatically compile a tex file right out of vim
#bash_version :any
#====================================================================
@RGreinacher
RGreinacher / wifi-reup.sh
Last active August 29, 2015 14:24
Reup Linux WiFi connection
#!/bin/bash
# inspired by MrEngman; https://www.raspberrypi.org/forums/viewtopic.php?t=16054
# set `sudo chmod +x ./network-manager.sh` and call it in `/etc/rc.local`
while true ; do
if ifconfig wlan0 | grep -q "inet addr:" ; then
sleep 60
else
echo "Network connection down! Attempting reconnection."
@RGreinacher
RGreinacher / osxLaunchAtStartup.swift
Last active December 22, 2018 00:50
Swift / OS X: Launch app at startup
// Adding Login Items Using a Shared File List
// This is a combination of the code provided by the following Stackoverflow discussion
// http://stackoverflow.com/questions/26475008/swift-getting-a-mac-app-to-launch-on-startup
// (This approach will not work with App-Sandboxing.)
func applicationIsInStartUpItems() -> Bool {
return itemReferencesInLoginItems().existingReference != nil
}
func toggleLaunchAtStartup() {