Skip to content

Instantly share code, notes, and snippets.

View gbasov's full-sized avatar

Gennady Basov gbasov

  • Amsterdam, The Netherlands
View GitHub Profile
@FradSer
FradSer / iterm2_switch_automatic.md
Last active May 21, 2024 03:18
Switch iTerm2 color preset automatic base on macOS dark mode.

The latest beta (3.5) includes separate color settings for light & dark mode. Toggling dark mode automatically switches colors.

Vist iTerm2 homepage or use brew install iterm2-beta to download the beta. Thanks @stefanwascoding.


  1. Add switch_automatic.py to ~/Library/ApplicationSupport/iTerm2/Scripts/AutoLaunch with:
@karllhughes
karllhughes / compose.yml
Last active April 8, 2021 06:57
laravel php docker compose file
version: "2"
services:
web:
image: karllhughes/php-fpm-mysql:latest
restart: always
links:
- database
- redis
env_file:
@ghinda
ghinda / object-to-form-data.js
Last active May 21, 2024 20:48
JavaScript Object to FormData, with support for nested objects, arrays and File objects. Includes Angular.js usage.
// takes a {} object and returns a FormData object
var objectToFormData = function(obj, form, namespace) {
var fd = form || new FormData();
var formKey;
for(var property in obj) {
if(obj.hasOwnProperty(property)) {
if(namespace) {