This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch --merged master | egrep -v '(^\*|master|dev)' | xargs git branch -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- COUNT ITEMS BY DATE INTERVAL | |
SELECT | |
DATE_TRUNC('hour', my_date_field), -- or second, minute, hour, day, week, month, year | |
COUNT(id) | |
FROM my_table | |
WHERE my_field IS NOT NULL | |
GROUP BY 1 | |
ORDER BY 2 DESC | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In your preferred editor navigate to the search/find + replace section | |
- In find: `(?<='\.)(.*?)(?=')` | |
- In replace: `$1.js` | |
This will replace all imports beginning with `.`, ending with `'` to a `.js` file ending. | |
// It will not match these | |
import p from '@scoped/npm_package' | |
import p from 'npm_package' |