Skip to content

Instantly share code, notes, and snippets.

View antillean's full-sized avatar

Kamal antillean

View GitHub Profile
@wojteklu
wojteklu / clean_code.md
Last active May 21, 2024 18:43
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

@tegansnyder
tegansnyder / disable mcafee endpoint protection.md
Last active December 26, 2023 03:18
Disable McAffee Endpoint Protection OSX

method 1

sudo /usr/local/McAfee/AntiMalware/VSControl stopoas

alternatively

sudo defaults write /Library/Preferences/com.mcafee.ssm.antimalware.plist OAS_Enable -bool False
sudo /usr/local/McAfee/AntiMalware/VSControl stop
sudo /usr/local/McAfee/AntiMalware/VSControl reload
@scottslowe
scottslowe / yaml-vagrantfile
Created October 21, 2014 21:16
This Vagrantfile works with an external data file (a YAML file, named servers.yaml) to create multiple Vagrant boxes easily. The servers.yaml file contains all the specifics and can be easily edited to change the number and type of boxes to create. The Vagrantfile remains unchanged.
# -*- mode: ruby -*-
# # vi: set ft=ruby :
# Specify minimum Vagrant version and Vagrant API version
Vagrant.require_version ">= 1.6.0"
VAGRANTFILE_API_VERSION = "2"
# Require YAML module
require 'yaml'
@mboersma
mboersma / yaml2json
Last active July 31, 2023 12:34
YAML to JSON one-liner
python3 -c 'import sys, yaml, json; y=yaml.safe_load(sys.stdin.read()); print(json.dumps(y))'