Skip to content

Instantly share code, notes, and snippets.

View sewera's full-sized avatar

Blazej Sewera sewera

View GitHub Profile
@sewera
sewera / doubly_linked_list_operations.c
Created May 21, 2019 22:24
Implementation of some operations in doubly linked lists in c (push back, printing, substitution)
/**
* Copyright 2019 Błażej Sewera
* Licensed under MIT License
*/
#include <stdio.h>
#include <stdlib.h>
typedef struct node {
@sewera
sewera / newline_rm.c
Created April 14, 2019 16:44
Example of removing newlines from buffer
void append_song_head(Song **head_ref) {
/**
* User interface for appending a new node.
*/
// Variables used in adding a new node
char artist[CHAR_LIMIT];
char album[CHAR_LIMIT];
char title[CHAR_LIMIT];
char year[6];
char duration_m[10];
@sewera
sewera / wallpaper.sh
Last active April 8, 2019 23:50
A simple bash script using feh and date to enjoy a different background every day!
#!/bin/bash
WP_DIR=/home/jazz/Pictures/Wallpapers
DESK=desktop
BG_LIST=($WP_DIR/$DESK/*)
N=${#BG_LIST[@]}
((N=RANDOM%N))
RAND_BG=$(basename ${BG_LIST[$N]})