If you're an Ableton Live user and have a lot of music, Ableton's .asd files can become quite annoying. You can hide them by running:
$ chflags hidden /path/to/folder/*.asd
const discogs = { | |
oauth_consumer_key: "xxxxx", | |
oauth_signature: "xxxxx", | |
} | |
const Auth = `OAuth | |
oauth_consumer_key="${discogs.consumer_key}", | |
# notice the ampersand after the consumer secret: | |
oauth_signature="${discogs.consumer_secret}&", | |
oauth_nonce="${Date.now()}", |
# Useful things I keep in my bash profile | |
alias untar='tar -zxvf'; | |
alias k='kubectl'; | |
alias c='docker-compose'; | |
alias d='docker'; | |
alias hackon='code . --add && github open .'; | |
alias yolo='git commit --amend --no-edit && git push -f'; | |
killport () { |
Useful information.
#!/bin/bash | |
# recursively walk directory | |
function traverse() { | |
for file in $(ls "$1") | |
do | |
#current=${1}{$file} | |
if [[ ! -d ${1}/${file} ]]; then | |
echo "${1}/${file}" |
#!/bin/bash | |
# | |
# Convert a directory of coffeescript test files to commonjs / jest | |
# and move them over to the src directory. | |
# | |
for coffee_file in $(find tests -name "*.coffee" -type f) | |
do | |
js_file=$coffee_file | |
js_file=$(echo "$js_file" | sed 's/Tests.coffee/.test.js/') |
jest.mock('react-beautiful-dnd', () => ({ | |
Droppable: ({ children }) => children({ | |
draggableProps: { | |
style: {}, | |
}, | |
innerRef: jest.fn(), | |
}, {}), | |
Draggable: ({ children }) => children({ | |
draggableProps: { | |
style: {}, |
Flywheel Local has XDebug installed by default if you choose “Custom” instead of “Preferred” when setting up a new local environment. If you don’t know which your current site is running, you can detect it by going to ”Site Setup” tab. If you can change the PHP version there, you have the “Custom” environment running. If not, just export your site, import it back and choose “Custom”.
Now that we have the right environment, remember what PHP version you are running, open the right PHP settings file (for example /Local Sites/my_site/conf/php/7.0.3/php.ini
) and add these lines in the [Xdebug]
section:
xdebug.remote_enable=1
xdebug.remote_autostart=1
Save the php.ini and restart your site container in Flywheel to apply new settings.
Wordpress ignores the selected page template for a page if you set it as a static home page, which is pretty frustrating in certain cases.
You can force it to use the custom page template by using this filter:
/**
* Use selected page template for static home page
*/
<?php | |
/** | |
* Plugin Name: Convert ACF PHP to JSON | |
* Description: Convert Advanced Custom Fields Pro configuration from PHP to JSON. | |
*/ | |
namespace ConvertAcfPhpToJson; | |
/** | |
* Add submenu item under 'Custom Fields' |