See the new site: https://postgresisenough.dev
| ''' | |
| This is a script that tries to convert Roam Daily Notes to Noteplan Calendar | |
| Notes. All it does is find files in the current directory that have a name | |
| matching the Roam Daily Notes format (e.g. "August 8th, 2020.md"), rename them | |
| to the Noteplan Calendar Notes format (YYYYMMDD, e.g. "20200808.md") and move | |
| them into a subfolder of the current directory: 'renamed_daily_notes'. | |
| I recommend you read this blog post before going any further: |
| #!/bin/bash | |
| # !!WARNING!! | |
| # This will DELETE all efforts you have put into configuring nix | |
| # Have a look through everything that gets deleted / copied over | |
| nix-env -e '.*' | |
| rm -rf $HOME/.nix-* | |
| rm -rf $HOME/.config/nixpkgs |
I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.
But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.
Svelte is a language.
Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?
A few projects that have answered this question:
| # First denoise audio | |
| ## Get noise sample | |
| ffmpeg -i input.ogg -vn -ss 00:00:00 -t 00:00:01 noise-sample.wav | |
| ## Create noise profile | |
| sox noise-sample.wav -n noiseprof noise.prof | |
| ## Clean audio from noise | |
| sox input.ogg clean.wav noisered noise.prof 0.21 |
| Alphabetical listing, generated with the following hoon: | |
| =p (turn (gulf 0x1 0xffff) |=(a/@ `@p`(cat 4 ~lisnus a))) | |
| *%/web/planets-lisnus/txt (turn p |=(a/@p (scot %p a))) | |
| --- | |
| Notable planets: | |
| ~bishes-bottem |
To test a glob pattern go over to globtester and play around with creating your own file structure online, it's super easy to get started that way.
If you want to test out a glob pattern in the terminal use echo followed by the pattern, for instance.
echo **/*.js
| var React = require('react/addons'); | |
| var ReactIgnore = { | |
| displayName: 'ReactIgnore', | |
| shouldComponentUpdate (){ | |
| return false; | |
| }, | |
| render (){ | |
| return React.Children.only(this.props.children); | |
| } |
#Error management in gulp
Sucking at something is the first step to becoming sorta good at something
No one can assure you, that plugins will run smooth in any circumstances (except for tests - they could), so neither should you convince anyone, that your plugin will never break. Only thing, that you could possibly do (if something gone wrong) - is gracefully inform your plugin user, that something went wrong and die.
We are will use this plugin from beginning to demonstrate error management. Suppose you have a task in gulpfile.js that contains this code (we modified it a little bit to be closer to real-usage):
var coffee = require('gulp-coffee');| #!/bin/bash | |
| set -o errexit | |
| # Author: David Underhill | |
| # Script to permanently delete files/folders from your git repository. To use | |
| # it, cd to your repository's root and then run the script with a list of paths | |
| # you want to delete. | |
| # Example: git-delete-history path1 path2 | |
| if [ $# -eq 0 ]; then |