Skip to content

Instantly share code, notes, and snippets.

@baronleonardo
baronleonardo / cockpit.nix
Last active May 23, 2021 17:04 — forked from thefenriswolf/cockpit.nix
add another maintainer
with import <nixpkgs> { };
stdenv.mkDerivation rec {
pname = "cockpit";
version = "244.1";
src = fetchzip {
url =
"https://github.com/cockpit-project/cockpit/releases/download/${version}/cockpit-${version}.tar.xz";
sha256 = "1fw7qmnwd7m9b4xklm7k15amwha8zy4sxk2a3hpdqgjp919v01a3";
@baronleonardo
baronleonardo / fish_alias.md
Created December 22, 2017 00:16 — forked from tikolakin/fish_alias.md
Create alias in Fish shell and save this as a permanent function

Directly from CLI

alias x='exit'
funcsave x

or create a file in

~/.config/fish/functions 

with name

@baronleonardo
baronleonardo / disable_panel_shadow.sh
Created April 16, 2017 10:23 — forked from alibitek/disable_panel_shadow.sh
Disable KDE panel shadow. Script to be placed in ~/.kde/Autostart/disable_panel_shadow.sh https://forum.kde.org/viewtopic.php?f=285&t=121592
for WID in `xwininfo -root -tree | sed '/"plasma-desktop": ("Plasma" "Plasma")/!d; s/^ *\([^ ]*\) .*/\1/g'`; do
xprop -id $WID -remove _KDE_NET_WM_SHADOW
done
# or
for WID in `xwininfo -root -tree | sed '/"Plasma": ("plasmashell" "plasmashell")/!d; s/^ *\([^ ]*\) .*/\1/g'`; do
xprop -id $WID -remove _KDE_NET_WM_SHADOW
done
@baronleonardo
baronleonardo / Makefile
Created November 11, 2016 09:55
A simple AVR makefile.
TARGET = firmware
AVR_ARCHI = atmega328p
CLK = 16000000L
SRC = $(wildcard *.c *.S *.s *.cpp)
OBJ = $(SRC:=.o)
CC = avr-gcc
CXX = avr-g++
GDB = avr-gdb
@baronleonardo
baronleonardo / Sphere.cpp
Created April 15, 2016 17:48 — forked from zwzmzd/Sphere.cpp
[OpenGL] An example to draw a sphere with vao and vbo
#include "sphere.h"
#include <vector>
#include <iostream>
#include <glm/gtc/matrix_inverse.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtx/string_cast.hpp>
Sphere::Sphere()
{
#!/usr/bin/env python
# found on <http://files.majorsilence.com/rubbish/pygtk-book/pygtk-notebook-html/pygtk-notebook-latest.html#SECTION00430000000000000000>
# simple example of a tray icon application using PyGTK
import gtk
def message(data=None):
"Function to display messages to the user."