Skip to content

Instantly share code, notes, and snippets.

View pniedzwiedzinski's full-sized avatar
📆
Liczę matmę

Patryk Niedźwiedziński pniedzwiedzinski

📆
Liczę matmę
View GitHub Profile
@pniedzwiedzinski
pniedzwiedzinski / cat.c
Created April 16, 2021 22:26
cat implementation using cosmopolitan
#include "libc/stdio/stdio.h"
int cat(char* filename) {
FILE *f;
f = fopen(filename, "r");
if (f == NULL) {
printf("Cannot open file '%s'\n", filename);
return 1;
}
@pniedzwiedzinski
pniedzwiedzinski / songbook.tr
Created March 28, 2021 08:34
Songbook in troff macro
.de C
\h'-30u'\v'-1em'\\$1\h'-\w'\\$1'u'\h'-42u'\v'1em'
..
.C Am
To jest tekst \c
.C C
piosenki
@pniedzwiedzinski
pniedzwiedzinski / hyperion.ng.json
Created February 22, 2021 07:15
Hyperion.ng config
{
"backgroundEffect": {
"color": [
255,
138,
0
],
"effect": "Pac-Man",
"enable": false,
"type": "effect"
@pniedzwiedzinski
pniedzwiedzinski / hyperion.nix
Created December 29, 2020 14:49
hyperion-ng nix expression
{ stdenv, fetchurl, autoPatchelfHook, callPackage,
expat, glib, systemd, libX11, libXrandr, fontconfig, tlf, ncurses5, bzip2,
readline70, openssl, db, libglvnd, libusb }:
with stdenv.lib;
let
srcAarch64 = fetchurl {
url = "https://github.com/hyperion-project/hyperion.ng/releases/download/2.0.0-alpha.8/Hyperion-2.0.0-alpha.8-Linux-aarch64.tar.gz";
sha256 = "1f2gbzfyqw8kclq0lx1bajs4xfrq3f2x07jyxngv65a4pr5ppfxk";
};
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ lib, config, pkgs, options, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@pniedzwiedzinski
pniedzwiedzinski / brave.md
Created September 27, 2020 13:18
Enable casting in brave

~/Library/Application Support/BraveSoftware/Brave-Browser/Local State - json file

jq .browser.enabled_labs_experiments - array of string

@1 - enabled, @2 - disabled

For chromecast it should be:

 "enabled_labs_experiments": [
@pniedzwiedzinski
pniedzwiedzinski / dwn.sh
Created August 12, 2020 14:44
Download websites as pdfs
#!/usr/bin/env nix-shell
#! nix-shell -p chromium pdftk -i sh
## Download webpages into pdfs
##
## Usage
## -----
##
## Put list of links into /tmp/urls and run script.
@pniedzwiedzinski
pniedzwiedzinski / Mandalorian Fan Art Wallpaper
Last active November 14, 2020 16:35
List of The Mandalorian wallpapers
https://www.iamag.co/wp-content/uploads/2019/12/Mandalorian-3.jpg
https://www.iamag.co/wp-content/uploads/2019/12/Mandalorian-2.jpg
https://www.iamag.co/wp-content/uploads/2019/12/Mandalorian-1.jpg
https://www.iamag.co/wp-content/uploads/2019/12/Mandalorian-33.jpg
https://www.iamag.co/wp-content/uploads/2019/12/Mandalorian-32.jpg
https://www.iamag.co/wp-content/uploads/2019/12/Mandalorian-31-scaled.jpg
https://www.iamag.co/wp-content/uploads/2019/11/EJxGm89VUAERo8e.jpeg
https://www.iamag.co/wp-content/uploads/2019/11/the-mandalorian-010-scaled.jpg
https://www.iamag.co/wp-content/uploads/2019/11/the-mandalorian-009-scaled.jpg
https://www.iamag.co/wp-content/uploads/2019/11/the-mandalorian-008-scaled.jpg
@pniedzwiedzinski
pniedzwiedzinski / file.cpp
Last active February 20, 2020 21:33
writing to file
// Author: Patryk Niedźwiedziński
#include <iostream>
#include <fstream>
using namespace std;
bool writeText(string filename, char* text) {
ofstream file(filename, ios::app); // append
if (!file.is_open()) { // sprawdza czy udało się dostać do pliku
@pniedzwiedzinski
pniedzwiedzinski / keybase.md
Created November 22, 2019 07:36
Keybase proof

Keybase proof

I hereby claim:

To claim this, I am signing this object: