Skip to content

Instantly share code, notes, and snippets.

View Najki's full-sized avatar

Nikodem Ośmiałowski Najki

View GitHub Profile
@jivanpal
jivanpal / kill-adobe-daemons.sh
Last active August 6, 2023 17:23
Stop Adobe Creative Cloud daemons (background processes) in their tracks
#!/bin/bash
if [ "$1" = "-s" ] || [ "$1" = "--show" ]; then
show=true
else
show=false
fi
if $show || [ "$1" = "-v" ] || [ "$1" = "--verbose" ]; then
verbose=true
@Najki
Najki / docker-trim.sh
Created May 8, 2018 10:05
Call fstrim for Docker virtual disk
#!/bin/bash
# Credits for the idea to https://djs55.github.io/jekyll/update/2017/11/27/docker-for-mac-disk-space.html
get_size () {
ls -alks $HOME/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.raw | awk '{print $1}'
}
reclaim_space () {
docker run --rm -it --privileged --pid=host walkerlee/nsenter -t 1 -m -u -i -n fstrim /var/lib/docker
}
@MoOx
MoOx / index.md
Last active January 28, 2018 15:24
MacBook Pro Thunderbold 3 / USB-C Dock station list

| Name | Henge Docks - Horizontal Docking Station | Henge Docks - Tethered Dock | TS3 Lite CalDigit | TS3 CalDigit | Thunderbolt 3 Express Dock HD | Plugable TB3 | Elgato TB 3 Dock | OWC Thunderbolt 3 Dock | |----------------|--

<?php
namespace Example\Doctrine\Util;
use Doctrine\ORM\Query;
class QueryUtils
{
/**
* @param Query $query
* @return array An array with 3 indexes, sql the SQL statement with parameters as ?, params the ordered parameters, and paramTypes as the types each parameter is.
@ubante
ubante / gitflow-breakdown.md
Last active March 24, 2024 13:26 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository

@wojteklu
wojteklu / clean_code.md
Last active May 23, 2025 13:25
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

@soffes
soffes / perferences.json
Created August 22, 2012 05:35
My Sublime Text 2 config
{
"bold_folder_labels": true,
"color_scheme": "Packages/User/Espresso Soda.tmTheme",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
".gitkeep",
"dump.rdb"
],