for filename in *.jpg; do newname=echo $filename | sed ‘s/xxx/yyy/g’; mv $filename $newname; done
cat ~/.ssh/id_rsa.pub | ssh USER@HOST "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
Let’s say you have a raspberry running at home and you want to access it from your office. If you have a google router you can easily set up IPv4 port forwarding 2222 -> 22 At this point from the office you can ssh -p…
Let’s say you need to run a process like a lightweight private npm proxy registry such as Verdaccio and you do not want to use a Docker container. You can run a simple command as noup verdaccio & . It might happen that the process…
echo "bla bla word word1 = string1 string2" | sed -e 's/.* \([^ ]*\)=.*/\1/g' Some basic regexp hints: the first /…/ is what your string should match s means substitute/replace the last /…/ is the replacement g means global, replace all occurrences a . will…
A very philosophical question, this one. I see modern those languages that were not there a couple/few years ago. Definitely java is seen as the older, more enterprisey technology. I don’t think many startups in silicon valley use it, they use more php (facebook), python,…
I came across to a great HTML Presentation Framework: reveal.js, which is a framework used to create stunning presentations using either a visual editor or simple text. https://github.com/hakimel/reveal.js/ Its create flexibility allows me to create my slides using Markdown https://help.github.com/articles/markdown-basics and convert everything by using…
Fields are declared outside of a class’s methods and are usually found right below the class declaration. Fields can be accessed by all methods of a class. They can also be accessed from other classes (unless they are private) using the dot operator. If a…