Skip to content

Instantly share code, notes, and snippets.

View alesya-h's full-sized avatar

Alesya Huzik alesya-h

View GitHub Profile
@endolith
endolith / Has weird right-to-left characters.txt
Last active July 17, 2024 12:41
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@jolby
jolby / core.cljs
Created August 2, 2011 00:12
Clojurescript on Appcelerator Titanium
(ns tiexample.core)
(defn ^{:export dbg} dbg [s]
(js* "Titanium.API.debug(~{s})"))
;;stolen from another gist I saw
(defn make-js-map
"makes a javascript map from a clojure one"
[cljmap]
(let [out (js-obj)]
@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 ""})
@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
@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 +@
(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)))
@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(
@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

@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@