Skip to content

Instantly share code, notes, and snippets.

View sinofp's full-sized avatar
👁️‍🗨️
Watching you

sinofp

👁️‍🗨️
Watching you
View GitHub Profile
@greg76
greg76 / matrix.py
Last active January 25, 2020 16:09
simple code rain effect from the movie Matrix
import random
import pyxel
class Matrix:
def __init__(self):
pyxel.init(160, 120, caption="there's no spoon")
self.loop = 0
self.width = pyxel.width // 4
@greg76
greg76 / scroll.py
Last active May 4, 2020 10:11
old school sinus text demoscene effect for starting experimenting with pyxel retro game engine
import math
import random
import pyxel
class Intro:
def __init__(self):
pyxel.init(160, 120, caption="Twin Sectors")
self.amplitude = 10
@pesterhazy
pesterhazy / ripgrep-in-emacs.md
Last active March 21, 2024 18:25
Using ripgrep in Emacs using helm-ag (Spacemacs)

Why

Ripgrep is a fast search tool like grep. It's mostly a drop-in replacement for ag, also know as the Silver Searcher.

helm-ag is a fantastic package for Emacs that allows you to display search results in a buffer. You can also jump to locations of matches. Despite the name, helm-ag works with ripgrep (rg) as well as with ag.

How

@tanyuan
tanyuan / smart-caps-lock.md
Last active May 3, 2024 08:19
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.
@zarzen
zarzen / spacemacs-cpp.md
Last active January 23, 2024 13:06
C++ development environment setup in Spacemacs
@solicomo
solicomo / solarized_for_xshell.xcs
Last active February 11, 2022 18:27
Solarized Light/Dark Theme of XShell
[Names]
count=2
name1=Solarized Dark
name0=Solarized Light
[Solarized Light]
text(bold)=586e75
magenta(bold)=6c71c4
text=657b83
white(bold)=fdf6e3
green=859900
@willurd
willurd / web-servers.md
Last active May 7, 2024 14:57
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@anastasop
anastasop / smiley.c
Created September 17, 2012 20:25
smiley.c
// the smiley program demonstrated by Russ Cox at http://research.swtch.com/acme
// it shows that the plan9 compiler http://plan9.bell-labs.com/sys/doc/comp.html fully supports UTF-8
// i tried to compile it with a recent version of the plan9 compiler running on vmware but it failed.
// it seems that older versions of the compiler supported sizeof(void) == 0
// anyway you get the idea
#include <u.h>
#include <libc.h>