Skip to content

Instantly share code, notes, and snippets.

View SuzanneSoy's full-sized avatar

Suzanne Soy SuzanneSoy

View GitHub Profile
@SuzanneSoy
SuzanneSoy / index.html
Last active September 22, 2023 12:41
unicode URL bar fun
<a href="https://‮blabla.serverdensity.io/# ‭mybank.com/">https://mybank.com</a>, definitely that site and not some other site ;)
@SuzanneSoy
SuzanneSoy / example.py
Created August 25, 2022 21:22
Reactive model→view function (full of bugs)
if True:
from PySide import QtGui
from PySide import QtCore
import threading
from collections import defaultdict
# resizing a window too fast seems to allow for the window manager to drop some requests.
# for experimentation, we resize a label within a fixed-size window.
w = QtGui.QLabel()
w.show()
We couldn’t find that file to show.
My contributions are dedicated to the Public Domain, using the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.
I hereby express my intent to waive all copyright restrictions on my contributions to the fullest possible extent, without expecting any compensation, so that my contribution may be distributed, modified, and used without restriction, including the redistribution with or without modifications under any license or legal terms.
To my knowledge, my contribution does not infringe any patent, and does not infringe any trademark.
@SuzanneSoy
SuzanneSoy / file.rkt
Last active May 9, 2017 15:51
Define-prop and get-prop, chez scheme-style, for Racket
#lang racket
;; License: creative commons zero-1.0
(module props '#%kernel
(#%provide (for-syntax current-props)
define-prop
get-prop)
(#%require racket/private/small-scheme
syntax/id-table
#lang racket
(define-syntax (define-enum stx)
(syntax-case stx ()
[(_ case-name contract-name id ...)
(with-syntax ([(code ...) (generate-temporaries #'(id ...))])
#'(begin (define-syntax case-name
(syntax-rules (id ...)
[(_ val [(id) code] ...)
(case val
[(id) code]
#!/bin/sh
set -e
# Call with:
#
# nixpatch.sh file_1 file_2 … file_n
#
# where each file_i is either an ELF executable or a shell script.
#
# This script will break badly if any of the arguments contain spaces.
# Don't use spaces in the file_i names!
#lang racket
(require racket/match)
(require racket/stream)
(define (for-each-cartesian-product lol fn)
(match lol
['() (fn '())]
[(cons hd tl)
(for [(elem hd)]
#!/bin/sh
set -e
# Call with:
#
# nixpatch.sh file_1 file_2 … file_n
#
# where each file_i is either an ELF executable or a shell script.
#
# This script will break badly if any of the arguments contain spaces.
# Don't use spaces in the file_i names!
# See also: http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Ubuntu_step_by_step
# See also: http://charles.lescampeurs.org/2013/11/01/redmine-on-ubuntu-13-10-with-apache2-and-passenger
echo "vb-redmine" | sudo tee /etc/hostname
sudo sed -i -e "s/vb-xub1310-64/vb-redmine/" /etc/hosts
sudo apt-get -y install apache2 libapache2-mod-passenger mysql-server mysql-client redmine redmine-mysql
# Configuring mysql-server-5.5
# New password for the MySQL "root" user:
# => root