Skip to content

Instantly share code, notes, and snippets.

View su8's full-sized avatar

su8

  • defunct
View GitHub Profile
#!/bin/bash
# Usage: cmus-rate [1-5]
#
# Rate tracks playing in cmus and add them to corresponding playlists.
#
# The track currently playing in cmus is added to an M3U playlist corresponding
# to the given rating ("[1-5].m3u") and removed from any other rating playlist.
# If no argument is given, the track is removed from all rating playlists.
#
# The playlists are kept sorted.
@su8
su8 / battleships.cpp
Created March 11, 2025 19:26 — forked from veesa/battleships.cpp
My first C++ programme... Battleships!
#include <iostream>
#include <ctime>
#include <cstdlib>
#include <string>
#include <vector>
using namespace std;
class Boat
{
#include <X11/Xlib.h>
#include <X11/Xutil.h>
int main(int argc, char* argv[])
{
Display* display = XOpenDisplay(NULL);
XVisualInfo vinfo;
XMatchVisualInfo(display, DefaultScreen(display), 32, TrueColor, &vinfo);