Skip to content

Instantly share code, notes, and snippets.

@duslabo
duslabo / feedparse.py
Last active January 30, 2016 19:12
This small piece of code can print the title and links of rss feed link provided in command line.
import feedparser
import sys
if len(sys.argv) < 2:
print("USAGE: python feedparse.py <rss feed link>")
exit()
rss_url = sys.argv[1]
print("TITLE"," ","LINK")
print("------------------------------------------------------------------")

This gist is a notes on systemd which I have noted down while reading a online documnet https://n0where.net/understanding-systemd/ and through man pages.Will keep updating it.

socket-based activation bus-based activation path-based activation device-based activation implicit dependency mapping instances and templates easy security hardening drop-ins and snippets - Override the Vanila units.

/* exec-notify, so you can watch your acrobat reader or vim executing "bash -c"
* commands ;-)
* Requires some 2.6.x Linux kernel with proc connector enabled.
*
* $ cc -Wall -ansi -pedantic -std=c99 exec-notify.c
*
* (C) 2007-2010 Sebastian Krahmer <krahmer@suse.de> original netlink handling
* stolen from an proc-connector example, copyright folows:
*/
/*
#include <stdio.h>
#include <sys/socket.h>
#include <linux/netlink.h>
#include <linux/connector.h>
#include <linux/cn_proc.h>
#include <stdlib.h>
#include <errno.h>
struct __attribute__ ((aligned(NLMSG_ALIGNTO))) nlcn_msg {
struct nlmsghdr nl_hdr;
# Setup for Fedora 17
sudo yum install python m4 make wget curl ftp hg tar bzip2 gzip unzip python-psyco perl texinfo texi2html diffstat openjade docbook-style-dsssl sed docbook-style-xsl docbook-dtds docbook-utils sed bc glibc-devel ccache pcre pcre-devel quilt groff linuxdoc-tools patch linuxdoc-tools cmake help2man perl-ExtUtils-MakeMaker tcl-devel gettext chrpath ncurses apr SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils autoconf automake
sudo yum install tftp-server
sudo yum install nfs-utils
sudo yum install minicom
sudo systemctl enable nfs-server.service
sudo systemctl disable firewalld.service # This may/maynot be on your system but causes grief if it is!
# -------------------------------------------------------------------------------