Skip to content

Instantly share code, notes, and snippets.

View Jimx-'s full-sized avatar
🎯
Focusing

Jin Xue Jimx-

🎯
Focusing
View GitHub Profile
C++ 5 hrs 52 mins [###############....] 78.9%
C 53 mins [##.................] 12.1%
Python 40 mins [##.................] 9.0%
@Jimx-
Jimx- / org-ocr.el
Created December 9, 2018 12:25
Recognize the text on images and insert it in place as a quote block in Org-mode
;;; org-ocr.el --- Recognize the text on images and insert it in place as a quote block in Org-mode -*- lexical-binding: t; -*-
;;; This file is NOT part of GNU Emacs
;;; License
;;
;; 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, or (at your option)
;; any later version.
@Jimx-
Jimx- / 2048.rkt
Created October 28, 2016 11:45
2048 game in 80 lines of Racket
#lang slideshow
(require slideshow/code)
; WASD to take a move
(define SIDE 50)
(define color-table (list "gray" (list 238 228 218) (list 238 224 198) (list 243 177 116)
(list 243 177 116) (list 248 149 90) (list 249 94 50) (list 239 207 108)
(list 239 207 99) (list 239 203 82) (list 239 199 57) (list 239 195 41)
(list 255 60 57)))
(define label-table (list "" "1" "2" "4" "8" "16" "32" "64" "128" "256" "512" "1024" "2048"))