Skip to content

Instantly share code, notes, and snippets.

@matthewjberger
matthewjberger / Cargo.toml
Last active April 17, 2022 15:33
An example of creating and serializing an ecs world with legion ecs in rust
[dependencies]
legion = "0.4.0"
serde = "1.0.125"
serde_json = "1.0.64"
@ihor-lev
ihor-lev / sublime_fix_home_end_keys.md
Last active May 20, 2024 08:01
Fix Sublime Text Home and End key usage on Mac OSX

Sublime Text Home/End keys default functionality jumps to the beginning and end of the file.

Fix Home and End keys to move the cursor to the beginning and end of lines.

Preferences > Key Bindings - User

Adding the following to the array:

{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },
#!/usr/bin/env python3
#
# Copyright 2014-2020 Cameron Hart <cameron.hart@gmail.com>.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
@mtornwall
mtornwall / pyrror.py
Created May 15, 2012 18:14
perror utility in python
#!/usr/bin/env python
import sys
import os
def usage():
print 'usage: {} [errno]'.format(sys.argv[0])
sys.exit(1)
if __name__ == '__main__':