Skip to content

Instantly share code, notes, and snippets.

:octocat:
Focusing

Krzysztof Królikowski kkrolikowski

  • Poland
Block or report user

Report or block kkrolikowski

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kkrolikowski
kkrolikowski / asm_hw.asm
Created May 10, 2019
x86 assembly Hello world! written in yasm
View asm_hw.asm
section .data
; -----
; Stale
NULL equ 0
LF equ 10
EXIT_SUCCESS equ 0
STDOUT equ 1
View keybase.md

Keybase proof

I hereby claim:

  • I am kkrolikowski on github.
  • I am kkrolikowski (https://keybase.io/kkrolikowski) on keybase.
  • I have a public key whose fingerprint is 8656 43F0 900B 2AF9 A386 7F49 4671 29EA 0B40 AC35

To claim this, I am signing this object:

@kkrolikowski
kkrolikowski / printdir_v2.c
Last active Apr 9, 2017
compatibile with XFS filesystem
View printdir_v2.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <unistd.h>
void printdir(char * name);
@kkrolikowski
kkrolikowski / purge.c
Created Jul 21, 2016
Purge directory with it's contents
View purge.c
void purgeDir(char * name) {
DIR * d;
struct dirent * entry;
const int pathlen = 256;
char buff[pathlen];
memset(buff, '\0', pathlen);
strcpy(buff, name);
d = opendir(name);
@kkrolikowski
kkrolikowski / printdir.c
Last active Jul 20, 2016
Recursive directory listing
View printdir.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <dirent.h>
void printdir(char * name);
int main(int argc, char *argv[]) {
printdir(argv[1]);
@kkrolikowski
kkrolikowski / mkdirtree.c
Created Apr 6, 2016
prosta funkcja zakładająca strukturę katalogów
View mkdirtree.c
void mkdirtree(char * path) {
int i = 0;
char buff[PATH_MAX];
memset(buff, '\0', PATH_MAX);
while(*path) {
buff[i] = *path;
if(*path == '/') {
mkdir(buff, 0755);
}
@kkrolikowski
kkrolikowski / json.c
Created Mar 10, 2016
json string extraction
View json.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct www {
char * srv_name;
char * srv_alias;
char * doc_root;
} www;
char * jsonVal(const char * json, const char * pattern);
View smtp.c
#include <stdio.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <netinet/in.h>
int main(int argc, char *argv[]) {
View randomize.c
/*
* randomize.c -- generate random file name
* Author: Krzysztof Krolikowski <kkrolikowski@gamil.com>
* compilation:
* gcc -o randomize randomize.c
* running:
* ~$ ./randomize
* dyndns_nBXGV0cW
*
*/
You can’t perform that action at this time.