Skip to content

Instantly share code, notes, and snippets.

View accidentallyc's full-sized avatar
💭
What's happening?

CasseyCola accidentallyc

💭
What's happening?
  • Tower Insurance
View GitHub Profile
@wojteklu
wojteklu / clean_code.md
Last active April 24, 2024 00:28
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

using System;
using System.Reflection;
using UnityEditor;
namespace Plugins.Gists.Editor
{
public static class InspectorLockToggle
{
[MenuItem("Tools/Toggle Lock &q")]
static void ToggleWindowLock() // Inspector must be inspecting something to be locked
@simonewebdesign
simonewebdesign / install.sh
Created September 14, 2013 09:30
Sublime Text 3 Install syntax highlighting for Jade on Linux (Fedora 19)
cd ~/.config/sublime-text-3/Packages
git clone https://github.com/miksago/jade-tmbundle.git Jade
@accidentallyc
accidentallyc / OpenWithSublimeText2.bat
Last active August 29, 2015 14:25 — forked from mrchief/LICENSE.md
Add "Open with Sublime Text 2" to Windows Explorer Context Menu (including folders)
@echo off
SET st2Path=C:\Program Files\Sublime Text 2\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2" /t REG_SZ /v "" /d "Open with Sublime Text 2" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 2" /t REG_SZ /v "" /d "Open with Sublime Text 2" /f