%s/<\d\d?>/0&/g|%&&|sor r/(\d{3})%(.\d{3}){3}/|%s/<00?\ze\d//g
- sort ip addresses%! jq .
reformat jsonJ
join selected lines or present and next line if no seelectiongJ
as above but do not adjust/remove whitespacegv
redo visual selection:%s/\s\+$//
Delete unwanted white space (at the end of lines):%s/,([^ ])/, \1/g
Add spaces after commas:s/MATCH/&ADD
apend ADD after MATCH%s/".{-}", //g
.{-} non greedy match e.g. "foo", 1, "bar", 2 -> 1, 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]--> | |
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]--> | |
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]--> | |
<!--[if (gt IE 9)|!(IE)]><!--> | |
<html lang="en" class="no-js"> <!--<![endif]--> | |
<head> | |
<!-- Meta tags --> |
If you are in a hurry you can fork/download this repo which has example tests and the relevant packages already set up: https://github.com/coopdigital/quickstartjest
This should get you to the point of writing a first test. It assumes OS X with homebrew installed. (see https://brew.sh/)
On Linux you should be able to substitute apt-get, yum etc when brew is mentioned. It might help to have node and npm already installed but we will be wrapping tooling around these.
This is geared towards Node but it should be the same for front-end code with test AFAIK (feel free to correct me).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; this is a comment | |
;; Never use single quotes allways use double quotes | |
;; % is like an anonymous function argumenrt | |
;; assignment | |
;; globally scoped to name-space | |
(def foo 1) | |
(== foo 1) ;; true |
- https://github.com/alebcay/awesome-shell
- https://github.com/jlevy/the-art-of-command-line
- http://www.madewithtea.com/dotfiles-are-your-digital-backpack.html
- http://www.drbunsen.org/the-text-triumvirate/
- https://github.com/rupa/z jump around in the shell,Tracks your most used directories, based on 'frecency'.
- https://github.com/rimraf/k Directory listings for zsh with git features
- https://github.com/rupa/p python/virtualenv utils
...if only I could remember them.
Tools, modules etc. See also: tip sheet.
- Toolz: Utility functions for interators, functions and dictionaries. These functions interoperate well and form the building blocks of common data analytic operations. They extend the standard libraries itertools and functools and borrow heavily from the standard libraries of contemporary functional languages.
- Boltons: boltons should be builtins.Boltons is a set of pure-Python utilities in the same spirit as, and yet conspicuously missing from, the the standard library.
- ptpython A better Python REPL
- A fast, extensible progress bar for Python https://github.com/tqdm/tqdm
- Various code metrics for Python code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://medium.com/@julianmartinez/how-to-write-a-slack-bot-with-python-code-examples-4ed354407b98 | |
https://medium.com/@julianmartinez/how-to-write-a-slack-bot-end-to-end-d6a8542c854b | |
https://api.slack.com/ | |
https://api.slack.com/bot-users | |
https://github.com/slackhq/python-slackclient | |
https://github.com/slackhq/python-rtmbot | |
https://github.com/llimllib/limbo | |
https://github.com/loisaidasam/pyslack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_directory_list(dpath): | |
'''returns a list of directories in a directory, | |
with fully qualified paths''' | |
if not os.path.isdir(dpath): | |
raise MyError('oops %s is not a directory'% dpath) | |
dirs = [os.path.join(dpath, filename) for filename in os.listdir(dpath) if (os.path.isdir(os.path.join(dpath, filename)))] | |
return dirs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://medium.com/@julianmartinez/how-to-write-a-slack-bot-with-python-code-examples-4ed354407b98 | |
https://medium.com/@julianmartinez/how-to-write-a-slack-bot-end-to-end-d6a8542c854b | |
https://api.slack.com/ | |
https://api.slack.com/bot-users | |
https://github.com/slackhq/python-slackclient | |
https://github.com/slackhq/python-rtmbot | |
https://github.com/llimllib/limbo | |
https://github.com/loisaidasam/pyslack |