Skip to content

Instantly share code, notes, and snippets.

View grambas's full-sized avatar

Mindaugas Milius grambas

View GitHub Profile
@muxa
muxa / garage-switch.h
Last active December 15, 2023 10:57
ESPHome cover single button control
#include "esphome.h"
const extern short STATE_UNKNOWN = 0;
const extern short STATE_CLOSED = 1;
const extern short STATE_OPENING = 2;
const extern short STATE_OPEN = 3;
const extern short STATE_OPENING_INTERRUPTED = 4;
const extern short STATE_CLOSING = 5;
const extern short STATE_CLOSING_INTERRUPTED = 6;
@sreez
sreez / gist:c624b3e440b66f9d16a9dc39a2297ed1
Created March 6, 2020 12:36
taiwindcss default list of padding , font size and line height against equivalent pixels for font base 16px
0px 0rem .p-0
4px 0.25rem .p-1
8px 0.5rem .p-2
12px 0.75rem .p-3, .leading-3, .text-xs
14px 0.875rem .text-sm
16px 1rem .p-4, .leading-4, .text-base
18px 1.125rem .text-lg
20px 1.25rem .p-5, .leading-5, .text-xl
24px 1.5rem .p-6, .leading-6, .text-2xl
28px 1.75rem .leading-7
@hofmannsven
hofmannsven / README.md
Last active April 19, 2024 13:17
Git CLI Cheatsheet
@codeinthehole
codeinthehole / portforward.sh
Last active August 6, 2023 22:02
Bash helper function for easier port forwarding - should be added to your ~/.bashrc
# Easier port forwarding - usage:
#
# $ portforward project-app1 5432
#
# where 'project-app1' is an alias from ~/.ssh/config and 5432 is the remote
# port that you want to forward to.
function portforward() {
HOST=$1
REMOTE_PORT=$2
# Pick a random port and check it is free
@Adirael
Adirael / fix-wordpress-permissions.sh
Created August 17, 2012 23:16
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory