Skip to content

Instantly share code, notes, and snippets.

View angie's full-sized avatar

Angie Merryweather angie

View GitHub Profile
@angie
angie / box-sizing.css
Created October 23, 2021 07:34
`box-sizing: border-box` global override
*,
*::before,
*::after {
box-sizing: border-box;
}
#!/bin/sh
# Take REACT_APP_* env vars and make them available at runtime
# Simplified version of https://www.freecodecamp.org/news/how-to-implement-runtime-environment-variables-with-create-react-app-docker-and-nginx-7f9d42a91d70/
set -euo pipefail
# Recreate config file
rm -rf ./env-config.js
touch ./env-config.js
*[_type == 'parentType'] {
...,
arrayFieldName[] {
_type == 'type1' => {
...,
'linkedResource': resource.asset->
},
_type == 'type2' => { // could also use rest `...` before special case
...
}
# remove old local branches last updated > 2 months ago
for k in $(git branch | sed /\*/d); do
if [ -n "$(git log -1 --before='2 months ago' -s $k)" ]; then
git branch -D $k
fi
done
# list branches merged to master
git branch --merged master | grep -v "\* master"
LogicBlox
filter call_regexp_common C++
filter remove_inline //.*$
extension logic
3rd_gen_scale 1.25
@angie
angie / capture-extjs-events.js
Created November 17, 2015 08:58
Capture all events fired by an Ext JS component
Ext.util.Observable.capture(component, function() {
console.log(arguments)
});
@angie
angie / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@angie
angie / test
Created July 9, 2014 13:01
Testing
Test test test test.