Skip to content

Instantly share code, notes, and snippets.

@rhardih
rhardih / uniquify.sh
Created June 18, 2015 12:39
Remove duplicates from a list of arguments in bash
#!/usr/bin/env bash
function uniquify {
echo "$@" | tr ' ' '\n' | sort -u | tr '\n' ' '
}
@rhardih
rhardih / crontab
Last active August 29, 2015 14:23
Cleanup stuff in ~/Downloads/
0 12 * * * find ~/Downloads/ -mtime +7 -maxdepth 1 -exec rm -rf {} \;
#include <stdio.h>
#include <string.h>
int main(int argc, char const *argv[])
{
int i, j, mod;
char tmp[50] = "";
char result[50] = "";
for(i = 1; i < 817; i++) {