Skip to content

Instantly share code, notes, and snippets.

View alesya-h's full-sized avatar

Alesya Huzik alesya-h

View GitHub Profile
@jtojnar
jtojnar / gimp-nix.md
Last active April 18, 2023 04:38
How to use Nix to build fresh GIMP

Nix is a package manager that you can install in parallel with your system package manager on Linux or MacOS. It allows you to effortlesly build any of the thousands of packages defined in the nixpkgs repository or write your own package expressions. Packages in the nixpkgs repository get periodically built by our CI server so the GIMP dependencies will be obtained from binary cache saving you time.

To obtain Nix, you can simply run an installation script, or use your package manager if it is packaged in your distro repositories. Notably, there is a package in Arch’s AUR and Debian Unstable.

The pull request containing changes for the latest changes for GIMP master is NixOS/nixpkgs#67576. I usually update the branch several times a month to point to t

@Treeki
Treeki / TurnipPrices.cpp
Last active July 8, 2024 02:08
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@saitoha
saitoha / rxvt-unicode-sixel.patch
Last active May 2, 2019 10:17
Add SIXEL graphics support for rxvt-unicode.
diff --git a/src/Makefile.in b/src/Makefile.in
index 18acb39e..ef2e7a40 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -40,7 +40,7 @@ COMMON = \
screen.o scrollbar.o scrollbar-next.o scrollbar-rxvt.o \
scrollbar-xterm.o scrollbar-plain.o xdefaults.o encoding.o \
rxvttoolkit.o rxvtutil.o keyboard.o rxvtimg.o \
- ev_cpp.o fdpass_wrapper.o ptytty_wrapper.o @PERL_O@
+ ev_cpp.o fdpass_wrapper.o ptytty_wrapper.o sixel.o @PERL_O@
@knubie
knubie / urbit-cheatsheet.md
Last active October 6, 2023 03:09
An Urbit cheat sheet

This cheat sheet contains lists of 'Hoon' words and symbols and short descriptions of what they are or what they do. Note that we unabashedly map Hoon concepts to the closest corresponding concept in other programming languages, even if the concepts are not quite the same. For example, in biology, [http://evolution.berkeley.edu/evosite/evo101/IIC1Homologies.shtml bird wings and bat wings are said to be analogous but not homologous], because they have similar function but they are not quite the same and indeed the common ancestor of birds and bats did not have wings. In this table, we map analogous concepts to each other even if they are not homologous; if bat wings and bird wings were here, we would map bat wings to bird wings. For example, we map 'gate' to 'function; see the section "Gates and lambda" from [http://doc.urbit.org/doc/hoon/tut/4/ Hoon tutorial section 4] for more discussion of this.

Please note that i am writing this in the process of learning Hoon, and i don't understand most of what is writt

@danielgracia
danielgracia / cgi-server.rb
Last active March 13, 2017 23:34
CGI Server in Ruby
#!/usr/bin/env ruby
# Script depends on whatever WEBrick has in Ruby 2.2.3
# Includes for convenience
require 'webrick'
include WEBrick
# Initialize plain server, no indexing, else CGI handling will be broken
s = HTTPServer.new(
(defun my-send-to-nrepl ()
(interactive)
(let ((p (point)))
(cider-eval-last-sexp 't)
(goto-char p)
(insert " ;;=> ")))
(defun my-send-to-nrepl2 ()
(interactive)
(let ((p (point)))
(defun my-send-to-nrepl ()
(interactive)
(let ((p (point)))
(cider-eval-last-sexp 't)
(goto-char p)
(insert " ;;=> ")))
(defun my-send-to-nrepl2 ()
(interactive)
(let ((p (point)))
@andkerosine
andkerosine / raskell.rb
Created August 15, 2012 05:56
Haskell-like list comprehensions in Ruby
$stack, $draws = [], {}
def method_missing *args
return if args[0][/^to_/]
$stack << args.map { |a| a or $stack.pop }
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :<
end
class Array
def +@
@lifning
lifning / mmmulticamcamcam.sh
Created February 18, 2012 06:19
gstreamer-based camera simulator
#!/bin/bash
DEV=$(zenity --file-selection \
--filename=/dev/video0 \
--file-filter='V4L2 loopback devices | video*')
echo "Select a window to capture..."
XID=$(xwininfo -int | grep 'Window id' | awk '{print $4}')
# camera width/height
@ctataryn
ctataryn / gist:1401486
Created November 28, 2011 18:46
Clojure Create Tables
(ns my.ns
(:use [korma.db])
(:use [korma.core])
(:require [clojure.java.jdbc :as sql]))
(def dbspec {:classname "org.h2.Driver"
:subprotocol "h2"
:subname "~/db/myapp"
:user "sa"
:password ""})