Skip to content

Instantly share code, notes, and snippets.

View VitoVan's full-sized avatar
💢
I'm sorry, did I break your concentration?

VitoVan

💢
I'm sorry, did I break your concentration?
View GitHub Profile
@nyuichi
nyuichi / 90-min-scc.scm
Created July 31, 2011 10:36
The 90 Minute Scheme to C Compiler
#!/usr/local/Gambit-C/bin/gsi
; Copyright (C) 2004 by Marc Feeley, All Rights Reserved.
; This is the "90 minute Scheme to C compiler" presented at the
; Montreal Scheme/Lisp User Group on October 20, 2004.
; Usage with Gambit-C 4.0:
;
; % ./90-min-scc.scm test.scm
/*
* Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@lotem
lotem / cangjie5.custom.yaml
Created June 17, 2012 11:58
Rime定製檔:設定【倉頡】的反查碼爲雙拼
# 因爲【雙拼】使用的詞典就是【朙月拼音】的詞典,所以輸入方案中原有的
# reverse_lookup/dictionary: luna_pinyin 保持不變,另外指定一項 prism
patch:
reverse_lookup/prism: double_pinyin
reverse_lookup/tips: 〔雙拼〕
reverse_lookup/preedit_format: []
@luozengbin
luozengbin / init-windows.el
Created July 5, 2012 08:55
emacs窗口布局自动保存跟复原
;;
;; win:resume-windows --> windows 状态保存跟复原
;;______________________________________________________________________
;;; 安装
;; http://www.emacswiki.org/emacs/WindowsMode
;; http://www.gentei.org/~yuuji/software/
;; (install-elisp "http://www.gentei.org/~yuuji/software/windows.el")
;; (install-elisp "http://www.gentei.org/~yuuji/software/revive.el")
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active March 13, 2025 12:34
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@orivej
orivej / screenshot.lisp
Last active June 5, 2018 15:20 — forked from liftoff/xcb_screenshot.py
Take, save, and display a screenshot in Common Lisp (using CLX and ZPNG).
(defmacro with-display (host (display screen root-window) &body body)
`(let* ((,display (xlib:open-display ,host))
(,screen (first (xlib:display-roots ,display)))
(,root-window (xlib:screen-root ,screen)))
(unwind-protect (progn ,@body)
(xlib:close-display ,display))))
(defun take-screenshot (&optional (host ""))
(with-display host (display screen root-window)
(xlib:get-image root-window :x 0 :y 0 :width (xlib:screen-width screen) :height (xlib:screen-height screen))))
@karpathy
karpathy / min-char-rnn.py
Last active March 15, 2025 18:41
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@watson
watson / airplay.md
Last active November 5, 2024 23:27
An overview over my AirPlay related modules
@yograterol
yograterol / gist:99c8e123afecc828cb8c
Created January 8, 2016 05:45
"gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory" workaround
"gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory" CentOS's and Fedora +22 workaround
Install `redhat-rpm-config`
$ sudo dnf install redhat-rpm-config
@politza
politza / scroll-other-window.el
Created July 3, 2016 08:22
scroll-other-window.el
;;; sow.el --- Variable commands for scrolling the other window.
;; Copyright (C) 2016 Andreas Politz
;; Author: Andreas Politz <[email protected]>
;; Keywords: extensions, frames
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or