This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* RFC1123 date parser. | |
* Copyright (c) 2010 by Michal Nazarewicz (mina86/AT/mina86.com) | |
* Distributed under the terms of Academic Free License 3.0 | |
*/ | |
#include <ctype.h> | |
#include <errno.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
int main(void) { | |
char tmp[128]; | |
while (scanf(" %128s ", tmp) == 1) { | |
if (!strcmp("Date:", tmp) && fgets(tmp, sizeof tmp, stdin)) { | |
fputs(tmp, stdout); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Oryginal by "ProgramistaBezDoswiadczenia!" | |
* At this point highly modified. | |
* See http://hoppke.jogger.pl/2010/01/13/cwiczenie-programistyczne/ | |
*/ | |
#include <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <pthread.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
static unsigned long count; | |
static unsigned long fib(unsigned n) { | |
++count; | |
return n > 1 ? fib(n - 1) + fib(n - 2) : n; | |
} | |
int main(void) { | |
unsigned i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# See http://damienix.jogger.pl/2010/12/01/skrypt-bashowy-wyswietlajacy-drzewko-struktury-katalogow/ | |
clr_dir='\33[1;34m' # Blue | |
clr_fil='\33[0;33m' # Yellow | |
clr_rst='\33[0m' # Text Reset | |
chain() { | |
# $1 $2 - no change |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
const char *fmt = "#include <stdio.h>%c%cint main() {%c const char *fmt = %c%s%c;%c printf(fmt, 10, 10, 10, 34, fmt, 34, 10, 10, 10, 10);%c return 0;%c}%c"; | |
printf(fmt, 10, 10, 10, 34, fmt, 34, 10, 10, 10, 10); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -eu | |
do_zip() { | |
unzip -x "$2" | |
} | |
do_rar() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _GNU_SOURCE | |
#include <linux/auxvec.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
static unsigned long *getauxv(void) { | |
char **env = environ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
line() { | |
local line=-------------------- | |
while [ ${#line} -lt $COLUMNS ]; do | |
line=$line$line | |
done | |
printf "%.$(($COLUMNS - 9))s %(%H:%M:%S)T\\n" "$line" -1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""Calculates the current version number. | |
If possible, uses output of “git describe” modified to conform to the | |
visioning scheme that setuptools uses (see PEP 386). Releases must be | |
labelled with annotated tags (signed tags are annotated) of the following | |
format: | |
v<num>(.<num>)+ [ {a|b|c|rc} <num> (.<num>)* ] |
OlderNewer