Skip to content

Instantly share code, notes, and snippets.

@xerpi
xerpi / PSVita_Linux_build_instructions.md
Last active April 1, 2024 12:51
PSVita Linux build instructions
@fay59
fay59 / Quirks of C.md
Last active January 23, 2024 04:24
Quirks of C

Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.

There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.

1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]

struct foo {
   struct bar {
 int x;
@karubabu
karubabu / SKK-JISYO.mahjong.patch
Created September 23, 2017 14:53
SKK-JISYO.mahjong.patch
*** SKK-JISYO.mahjong 2017-09-23 23:40:44.398832446 +0900
--- SKK-JISYO-new.mahjong 2017-09-23 23:43:31.818838527 +0900
***************
*** 1,3 ****
--- 1,6 ----
+ ;;; -*- coding: utf-8 -*-
+ ;; okuri-ari entries.
+ ;; okuri-nasi entries.
やくまん /役満;[麻雀]/
さんばいまん /三倍満;[麻雀]/
@lmullen
lmullen / Makefile
Last active February 25, 2023 21:14
PDF slides and handouts using Pandoc and Beamer
SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md))
HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md))
all : $(SLIDES) $(HANDOUTS)
%.md.slides.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -o $@
%.md.handout.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -V handout -o $@
@masami256
masami256 / arch_build.patch
Created July 1, 2014 14:43
archでOSvをビルドするhackなパッチ
diff --git a/scripts/osv/modules/api.py b/scripts/osv/modules/api.py
index 59a709d..7b88415 100644
--- a/scripts/osv/modules/api.py
+++ b/scripts/osv/modules/api.py
@@ -29,7 +29,7 @@ class java_app(object):
def _to_args_list(text_or_list):
if not text_or_list:
return []
- if isinstance(text_or_list, basestring):
+ if isinstance(text_or_list, str):
anonymous
anonymous / wixoss.m
Created June 27, 2014 18:27
#include <Foundation/Foundation.h>
int main()
{
printf("%s\n", @selector(infectedWIXOSS:));
return 0;
}
/*