Skip to content

Instantly share code, notes, and snippets.

View mgaebler's full-sized avatar
🏘️

Marian Gaebler mgaebler

🏘️
View GitHub Profile
@mgaebler
mgaebler / gist:055a08827cdfb95fa84a4a5d7ef2255b
Last active August 25, 2022 13:36
NGINX: Custom JSON status page with stub_status
# Make sure the ngx_http_stub_status_module is installed correctly.
location /status {
add_header Content-Type application/json;
return 200 '{\r
"connections_active": $connections_active,\r
"connections_reading": $connections_reading,\r
"connections_writing": $connections_writing,\r
"connections_waiting": $connections_waiting
}';
}
window.parent.document.body.style.backgroundColor = "#80FF00";

Keybase proof

I hereby claim:

  • I am mgaebler on github.
  • I am mgaebler (https://keybase.io/mgaebler) on keybase.
  • I have a public key ASA9vNeFcCPsEEpPltQNkt6cSNqJH15O87-z6lUoCeGg9Ao

To claim this, I am signing this object:

@mgaebler
mgaebler / config.fish
Last active November 19, 2017 13:37 — forked from ronaldsuwandi/config.fish
My personal fish shell config for OS X (better blue colour for directory in dark terminal). Supports git branch
# nice light cyan color instead of dark blue
set -gx LSCOLORS gxfxcxdxbxegedabagacad
function ls --description 'List contents of directory'
command ls -lFG $argv
end
function code --description 'Launches visual code studio in a new window'
command code -n $argv
end
@mgaebler
mgaebler / fish_get_node_version.fish
Last active February 20, 2020 21:01
Fish shell function that returns the current node version if you're using nvm
function __use_node_version
# test if .nvmrc exists
if test -e .nvmrc
# test if variable exist and compare version with .nvmrc
if test \( -n "$NVMRC_CURRENT" \) -a \( $NVMRC_CURRENT = (cat .nvmrc) \) > /dev/null 2>&1
# node version allready set
else
# create a nvm current variable
set -g NVMRC_CURRENT (cat .nvmrc)
nvm use $NVMRC_CURRENT > /dev/null
@mgaebler
mgaebler / gist:b3a68928bccba0552b9e11d444969adc
Last active March 3, 2022 12:35
Placeholder hack for <input type="date" />
input[type="date"]:before {
content: attr(placeholder) !important;
display: block;
width: 100%;
}
input[type="date"]:focus:before,
input[type="date"]:valid:before {
display: none;
}

Git supports conditional includes since version 2.13. With these you're able to allow overrides under specific conditions. Sometimes it's useful to separate configurations, because your company uses different git settings like email or ssh key.

I've organised my projects in different directories, private and work.

~/
├── private
└── work

Template 4: Brainstorm

Goals/Issues

  • Point 1
  • Point 2
  • Point 3

Research

@mgaebler
mgaebler / ReactCompoundComponent.md
Last active April 7, 2020 07:26
ReactProgrammingPatterns

Compound Components

What are compound components?

Compound components is a pattern in which components are used together such that they share an implicit state that let’s them communicate with each other in the background.

Think of compound components like the and elements in HTML. Apart they don’t do too much, but together they allow you to create the complete experience. — Kent C. Dodds When you click on an option, select knows which option you clicked. Like select and option, the components share the state on their own, you don’t have to explicitly configure them.

@mgaebler
mgaebler / definition.md
Last active August 3, 2022 08:26
Theming

Theme definition

The theme specifies the color of the components, darkness of the surfaces, level of shadow, appropriate opacity of ink elements, etc.

Themes let you apply a consistent tone to your app. It allows you to customize all design aspects of your project in order to meet the specific needs of your business or brand.

To promote greater consistency between apps, light and dark theme types are available to choose from. By default, components use the light theme type.