Skip to content

Instantly share code, notes, and snippets.

ifneq ($(KERNELRELEASE),)
obj-m := my_vfs.o
my_vfs-objs := my_vfs_module.o
else
KVER = $(shell uname -r)
KDIR = /lib/modules/$(KVER)/build
modules::
$(MAKE) -C $(KDIR) M=$(shell pwd) modules
anonymous
anonymous / gist:760992
Created December 31, 2010 13:12
C++でLinuxカーネルモジュール、Makefile
KERNEL_DIR = /root/linux
VERBOSE = 0
ARCH = x86
EXTRA_CFLAGS := -isystem $(KERNEL_DIR)/include -isystem $(KERNEL_DIR)/arch/$(ARCH)/include
obj-m := hellocxx.o
CFLAGS_hellocxx.o := -x c++ -std=gnu++0x -fno-operator-names -fno-rtti -fpermissive -fno-exceptions
all:
@gasman
gasman / gfm.py
Created March 6, 2011 00:57 — forked from mvasilkov/gfm.py
import re
from hashlib import md5
def gfm(text):
# Extract pre blocks.
extractions = {}
def pre_extraction_callback(matchobj):
digest = md5(matchobj.group(0).encode('utf-8')).hexdigest()
extractions[digest] = matchobj.group(0)
return "{gfm-extraction-%s}" % digest
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
anonymous
anonymous / glmatrix.d.ts
Created December 12, 2012 14:22
gl-matrix - 2.0 - TypeScript definition file.
declare module glmatrix {
interface Vec2Array extends Float32Array {
}
interface Vec3Array extends Float32Array {
}
interface Vec4Array extends Float32Array {
}
@ttdoda
ttdoda / gist:4728768
Created February 7, 2013 05:24
xterm version check
vim
>= 95 button-event mouse
>= 141 request termcap/terminfo string
>= 277 sgr-mouse
Emacs (xterm.el)
>= 216 modifyOtherKeys
>= 242 query background color
MinEd
>= 251 title stack
>= 210 UTF-8 title

Atomコードリーディングメモ

ビルド方法

script/build

起動したらsrc/window-bootstrap.coffeeが起動時間のログを出してるので、そいつをgrepすると/src/broweser/atom-application.coffee が引っかかる。

src/broweser/atom-application.coffee は、 src/browser/main.coffee に呼ばれている

@tokoroten
tokoroten / box2dtest.cpp
Last active January 10, 2018 11:30
box2dで遊んでみる
# include <Siv3D.hpp>
# include <HamFramework.hpp>
class Ball
{
public:
static const double SIZE;
static const Polygon POLYGONS[];
static const Color COLORS[];
static Font FONT;