shapeshed / shapeshed.com Goto Github PK
View Code? Open in Web Editor NEWSource code for shapeshed.com
Home Page: https://shapeshed.com
Source code for shapeshed.com
Home Page: https://shapeshed.com
When I run the script like in the post I got the error:
line 5: fc: -R: invalid option
So I change #!/usr/bin/env sh
to #!/usr/bin/env zsh
and the script works fine.
Thank you for the post!
Hello George,
Came across your blog post and thought I’d drop a line.
Vault is great at many things and definitely a key innovator, but it’s not SECURE. Once unsealed, the entire repository of secrets is essentially sitting in plain memory ready for scraping. Granted that one must have access to the host/guest provisioning Vault to do so, but that’s not categorized as strong security.
Happy to explain further if you have a few minutes to chat.
Thank you,
Arvind
@risk of being perceived as an advert, am only trying to raise awareness.
In the unix.tr article you say the following:
How to delete specific characters
To delete specific characters use the -d option. This option deletes characters in the first set specified. The following example removes any occurrence of ‘up’.
echo 'clean this up' | tr -d 'up'
clean thisNote that the tr is relatively crude. For more complex patterns sed is a better option.
The way your article is written implies that the command will remove any occurrence of the string up whereas what it will actually do is remove any occurrence of the characters u and p.
In the example you gave the result is the same as u and p appear only once however in this example the results would not be as your article implies:
echo 'clean up after puppys' | tr -d 'up'
clean after ys
I think the following change would make more sense.
--The following example removes any occurrence of ‘up’.
++The following example removes all occurrences of the characters ‘u' and 'p’.
Hi George,
I saw your article on xargs and you referenced a comparison of
find ./foo -type f -name “*.txt” -exec rm {} ;
and the similar command with xargs.
There is a more efficient way to use find for the same thing:
find ./foo -type f -name “*.txt” -delete
I thought it might be interesting if you were to compare that with your other outcome. The -exec {} flag for find is pretty inefficient (but also very handy).
Thanks for the nice article.
Regards,
Brantley Hudson
https://shapeshed.com/using-the-european-npm-mirror/
The domain registry.npmjs.eu seems to point somewhere else now. Maybe recommend something like Verdaccio or JFrog mirror registries instead.
Hey,
I just tried stumbled upon your wc tutorial regarding file counting in a
directory
(last paragraph: https://shapeshed.com/unix-wc/)
and I think your suggestion "ls -l | wc -l" undercounts by one.
Pls just ignore this remark, if I am wrong!
Regards,
Jonas
The article is demonstrating integration with LDAP, which is being used as an auth backend. However, description implies LDAP is being used as the secrets backend:
How to use HashiCorp Vault to setup an LDAP backed secret store with read-only access for users in groups and read-write access for specific users
The guide is helpful to get CLI scripts running, thanks for that.
I struggle with tests though. I can get my piping tests to work (using exec
). But the command line parameters (using execFile
) always time out. It seems the script thinks piping is enabled.
Could you add a paragraph about how to test such CLI scripts that also accept piping from stdin?
Thanks
I was reading Writing cross-platform Node.js and when I clicked on "Node.js" under the tags section, the redirect gave me the 403 error in the following url: https://static1.shapeshed.com/tags/node.js/
I don't know how to solve the problem making a PR.
Dear Shapeshed.
In your article on ps
:
https://shapeshed.com/unix-ps/#how-to-just-get-the-process-id
you say the following:
You can find the PID by doing:
ps -ef | grep vimgeorge 12608 5736 0 21:00 pts/2 00:00:11 vim content/post/unix-ps.md george 18324 5763 0 21:32 pts/3 00:00:00 grep vim
But you don't mention which number is the PID...
The article at https://shapeshed.com/why-use-web-safe-colours/ says
But most mobile phone browsers can only display 256 colors.
This seems extraordinary and is presented without comment. It seems unlikely that any browser that can execute the JavaScript of a modern web page is doing so in 8-bit colour...
Secondarily, the link that gives a source for the claim that 3% of users are still on 8-bit hardware doesn't seem to report the colour depth at all: http://www.w3schools.com/browsers/browsers_stats.asp
I would be surprised to learn that there is anybody browsing the modern web in 8-bit colour without knowing what they're getting themselves into!
I would be interested to find these claims to be substantiated if you are able :)
Hi there George, I was reading tutorials on your website and I come across something that confuses me.
The page in question is https://shapeshed.com/unix-rm/
You wrote:
In the following example a pattern is used to remove all filenames ending in ‘.txt’.
ls
foo.txt bar.txt baz.zip
rm *.zip
ls
baz.zip
I will try to explain what's happening here.
Line 1 - list files in a directory
Line 2 - directory listed foo.txt bar.txt baz.zip
Line 3 - remove anything any file that has an extension of .zip
Line 4 - list files in a directory
Line 5 - directory listed baz.zip
Line 5 is error it shouldn't listed baz.zip if Line 3 command says to remove everything that has a file name that ends with .zip
Unless you meant to say remove everything that has an extension of .txt in which case line 3 should have been rm *.txt
Or if line 3 is not an error and you intended it to be that way then line 5 should've output foo.txt bar.txt instead of baz.zip
Am I wrong with my assessment? I'm new to learning linux commands. Your tutorial are great keep it up, I thought I could help
out by pointing out typos like these.
I read the post you wrote about Vim packages, and I switch to native package too, but I found a strange question about syntax
and runtimepath
.
The key is the order of both syntax ebable
and filetype plugin on
.
" Pathogen
execute pathogen#infect()
syntax on
filetype plugin indent on
" Nativa package
filetype plugin indent on
syntax on
Native package management and third-party package management in the runtimepath there is a certain difference.
On the page at https://shapeshed.com/default-styles-for-css/ the download link to https://cdn.shapeshed.com/downloads/default_css.zip is broken in Mobile Safari on iOS 13. The error message displayed reads:
“Safari cannot open the page because it could not establish a secure connection to the server.”
Hi!
Very good post!
I had to change the container port! It was not 8080 but 8000!
$ kubectl run hello-go --image=shapeshed/hello-go --port=8000
Thanks,
Marcelo Módolo
I read your post on using netrw
instead of NERDtree and found it very helpful. I just wanted to know how to keep the navigation pane in view if you are opening each new file in a new tab, that is, instead of this:
let g:netrw_browse_split = 1
if I use this:
let g:netrw_browse_split = 3
The following statement seems erroneous.
The following are equivalent.
find ./foo -type f -name ".txt" -exec rm {} ;
find ./foo -type f -name ".txt" | xargs rm
The first command executes rm command for each file found by find separately (can count number of clone() system calls with strace util) while the xargs version as it is written (without specifying -n max-args) will do minimal number of invocations to use up the list of the files. Please see the excerpt from the xargs man page:
The command line for command is built up until it reaches a system-defined limit (unless the -n and -L options are used). The specified command will be invoked as many times as
necessary to use up the list of input items. In general, there will be many fewer invocations of command than there were items in the input. This will normally have signifi‐
cant performance benefits.
So it does not make sense to compare performance of these two commands as presented.
You can use -exec rm '{}' + to make find behave similarly.
I have no idea of how performance compares in this case (going to try later), but can make a pretty good guess that the numbers should differ significantly.
The booting code DEBUG=express_example:* npm start
needs to be updated to DEBUG=express_example:* & npm start
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.