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"
@b0gdanw
b0gdanw / disable.sh
Last active August 15, 2024 17:01
Disable bunch of #$!@ in Catalina
# Credit: pwnsdx https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21; nebular https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3#gistcomment-3019082
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to disable SIP: Reboot to Recovery, in Terminal csrutil disable
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# List disabled services: launchctl print-disabled user/501 |grep true & launchctl print-disabled system |grep true
@ihor-lev
ihor-lev / sublime_fix_home_end_keys.md
Last active September 6, 2024 07: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__':