Skip to content

Instantly share code, notes, and snippets.

@etzl
etzl / cool_window.c
Last active March 8, 2021 12:02
A cool looking window with extra features (using ncurses)
#include <curses.h>
#include <panel.h>
#include <menu.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
char *itemsstr[][2] = {
{"Resume", "Continue where you left"},
@etzl
etzl / panel_browse.c
Last active October 25, 2020 17:18
ncurses with panels a customizable window inside terminal - but not very functional :)
#include <curses.h>
#include <panel.h>
#include <string.h>
#include <stdlib.h>
#define NLINES 10
#define NCOLS 40
#define COUNT 3
#define TEELINE 2
@etzl
etzl / IPAddress
Last active December 2, 2018 12:47
Get public ip and show in terminal using python with no extera package needed
import requests
response = requests.get("https://httpbin.org/ip")
print(response.json()['origin'])