#TIL : Zip compressing list of files

To specify a list of compressed files when using zip cli tool, you could use [email protected] [file_list] flag. And file_list is a file contains list of compressed file (new line separated)

Example

1
$ zip changed.zip [email protected] changed_files.txt

Or use stdin pipe

1
$ find . -mmin -60 -print | zip changed_1_hour_ago [email protected]

This will zip all changed files 1 hour ago

#TIL : Base 64 encode and decode builtin tool

Browsers have helpers function to encode and decode base64 :

  • btoa : base64 encode
  • atob : base64 decode
1
2
3
4
5
> btoa('Hello world')
"SGVsbG8gV29ybGQgIQ=="

> atob('SW4gR29kIFdlIFRydXN0ICE=')
"In God We Trust !"

Today I Learned - automated tool helps you learn everyday.

Introduction

We constantly learn new things. This is a repo to share those learnings. TILs are short Markdown documents (a few sentences + example code) explaining concepts, bits of syntax, commands, or tips we’ve recently learned.

Today-I-Learn (TIL) is inspired by Thoughbot, TIL is a repository for everyone to share what we have learn today.

This repo has a tool that help you to manage and write down what you learned in scientific way. https://github.com/khanhicetea/today-i-learned

And this is my repo used TIL : https://github.com/khanhicetea/what-i-leaned-today

Instruction

Step 1 : Fork this repo (blank-repo with only tool and readme file).

Step 2 : Start writting down what you learned in everyday.

  • Create a topic
1
$ ./til [CATEGORY] [SUBJECT]

Ex:

1
$ ./til bash "Bash Conditional Expression"

It will create 1 file bash/Bash-Conditional-Expression.md

  • Write content
  • Save it !

Step 3 : Commit what you learned today

1
$ ./til commit

After that, if you want to push it to repository, just Enter.

License

© 2015 khanhicetea. Distributed under the Creative Commons Attribution License.

Ref