Skip to content

Instantly share code, notes, and snippets.

@nate-xyz
nate-xyz / libadw_hello.py
Created August 17, 2022 22:43
gtk4 libadwaita python hello_world
import sys
import gi
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Gio, Adw
class Window(Gtk.ApplicationWindow):
@nate-xyz
nate-xyz / print_out.sh
Created July 23, 2022 20:43
bash script to create printabe pdf of your code, using enscript, ps2pdf, and pdftk
#!/bin/bash
i=0
mkdir ./tmp
for file in $(find . -name \*.$1)
do
if [ $(cat $file | wc -l) -gt 0 ]
then
enscript -1RG --line-numbers --margins=0:0:0:0 -p ./tmp/output-$i.ps $file
ps2pdf ./tmp/output-$i.ps ./tmp/output-$i.pdf
((i=i+1))
// SPDX-License-Identifier: MIT
// Only allow compiler versions from 0.7.0 to (not including) 0.9.0
pragma solidity >=0.8.0 <0.9.0;
contract Bakery {
// State variables
address public owner;
bool shopIsOpen;