use git diff to generate file list
git diff --name-only master
add ext filter
#!/bin/zsh | |
# Help message function | |
function show_help() { | |
cat <<- EOF | |
Usage: ${0} [OPTIONS] -e EXTENSIONS | |
Concatenates the contents of specified file types into a single file, with headers indicating the source files. | |
OPTIONS: | |
-d Directory to start looking for files (default is current directory) | |
-e Extensions to include, comma-separated. Example: js,jsx,ts |
# .github/workflows/rails-tests.yml | |
name: Rails Tests | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
PGHOST: localhost | |
PGUSER: postgres | |
RAILS_ENV: test |
use git diff to generate file list
git diff --name-only master
add ext filter
Sometimes, debugging with console.log
is not enough to find out what is
happening in the code, as console.log
prints only plain objects but neither
functions nor objects with circular references. Besides, it's possible you
may need to know the context and flow of the code.
Read more about debugging with VS Code in VS Code: Debugging.
CapsLock is RCTRL ... i do this on all keyboards
FN CapsLock is RCTRL ... was accidently toggling capslock with fn+capslock
LCTRL is FN ... arrow/pg/home on right half, FN+arrow I now prefer on ALL keyboards... so nice
All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.
A number of methods in React are assumed to be "pure".
On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.
launch application "Microsoft Outlook" | |
launch application "Slack" | |
property startDate : current date | |
property endDate : startDate + (10 * minutes) | |
property cachedStatus : "" | |
property results : {} | |
property running : true | |
global emailAddress |
brew install apple-gcc42 openssl libyaml libffi | |
xcode-select --install | |
export CC=/usr/local/bin/gcc-4.2 | |
export CFLAGS='-g -O2' | |
export RUBY_CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` | |
export CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` | |
rbenv install 1.8.7-p375 |
### http://git-prompt.sh/ | |
source ~/.git-prompt.sh | |
### Set PS1 | |
export PS1="[\[\033[32m\]\w\[\033[0m\]]\$(__git_ps1)\n\[\033[1;36m\]\u\[\033[32m\]$ \[\\033[0m\]" | |
export PATH=/usr/local/bin:~/bin:$PATH | |
### Set SublimeText as default editor | |
ln -sf "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl |
<!-- In your simple_form use this code but change the column name, collection values, and model reference --> | |
... | |
<%= f.input :campaign_type, :label => false, :collection => [['Both Media Types', 'Both Media Types'], ['Just Video', 'Just Video'], ['Just Photo', 'Just Photo']], :label_method => :last, :value_method => :first, :as => :materialize_radio_buttons, :checked => @campaign.campaign_type %> | |
... |