type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
| /* 0-1 knapsack problem | |
| For an overall introduction to knapsack problem, see https://en.wikipedia.org/wiki/Knapsack_problem | |
| Function name: knapsack | |
| Param: | |
| items: an array of {w: v:} (where 'w' stands for weight, and 'v' stands for value) | |
| capacity: a positive integer number | |
| Will return max sum value that can reach, and the chosen subset to add up to the value. |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5)
Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories
Use one tab https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall to shorten them to a list.
Save that list to some path
The list should be in the form of “ur_username\repo_name” per line. Use regex search (Sublime text could help). Search for ' |.*' and replace by empty.
| This is free and unencumbered software released into the public domain. | |
| Anyone is free to copy, modify, publish, use, compile, sell, or | |
| distribute this software, either in source code form or as a compiled | |
| binary, for any purpose, commercial or non-commercial, and by any | |
| means. | |
| In jurisdictions that recognize copyright laws, the author or authors | |
| of this software dedicate any and all copyright interest in the | |
| software to the public domain. We make this dedication for the benefit |