Skip to content

Instantly share code, notes, and snippets.

View juliusknorr's full-sized avatar

Julius Knorr juliusknorr

View GitHub Profile
@juliusknorr
juliusknorr / gist:5905622
Last active January 6, 2024 11:59
uploadscript for uberload webspace
#!/bin/bash
# uberload
# usage: uberload <folder> <source>
# this script uploads a given file or folder to a folder on my uberspace host
# if the source is a folder it gets compressed using pbzip2
# the url of the file will be put into the clipboard (os x)
# notification when the file is uploaded using terminal-notifies
# this also works with any other ssh server
SSHUSER="sshuser"
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#define DEBUG 1
static int semID;
@juliusknorr
juliusknorr / gist:5483606
Created April 29, 2013 18:22
sysprog add exercise script
#!/bin/bash
mkdir a$1 # create folder
touch a$1/readme # create readme
touch a$1/a$1.c # create main c file
## Template for readme
echo "Autor: Julius Haertl
Systemprogrammierung SS 2013
Blatt 2: Prozesse unter Linux
@juliusknorr
juliusknorr / build.sh
Created April 29, 2013 18:21
sysprog build script
#!/bin/bash
echo "======= Sysprog Build Script ======="
for f in $(find $SrvDir* -maxdepth 0 -type d );
do
echo "Compiling $f"
sourcefile=""
for sf in $(find $f -iregex '.*\(c\)' -printf "%f\n")
do