netstat
has some very neat features we could make use of more often! Here is 5.
Note: examples here may not apply to BSD based systems
1. The classic: list local listening TCP/UDP ports and their process:
$ sudo netstat -tulpn
#Introduction to Devops Resources:
##Chapter 1
2015 State of DevOps Report https://puppet.com/resources/white-paper/2015-state-of-devops-report
Knight Capital https://en.wikipedia.org/wiki/Knight_Capital_Group
import binascii | |
import struct | |
class Punk(object): | |
_END_CHUNK_TYPE = 'IEND' | |
_PUNK_CHUNK_TYPE = 'puNk' | |
_MAX_BYTES = 2147483647 | |
_chunks = dict() |
# The MIT License (MIT) | |
# Copyright (c) 2014 Dave Clark | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
#!/usr/bin/env python | |
import argparse | |
import sys | |
import jinja2 | |
import markdown | |
TEMPLATE = """<!DOCTYPE html> | |
<html> |
It's hard to quarrel with that ancient justification of the free press: "America's right to know." It seems almost cruel to ask, ingeniously, "America's right to know what, please? Science? Mathematics? Economics? Foreign languages?"
None of those things, of course. In fact, one might well suppose that the popular feeling is that Americans are a lot better off without any of that tripe.
There is a cult of ignorance in the United States, and there always has been. The strain of anti-intellectualism has been a constant thread winding its way throughout political and cultural life, nurtured by the false notion that democracy means that "my ignorance is just as good as your knowledge."
Politicians have routinely striven to speak the language of Shakespeare and Milton as ungrammaticaly as possible in order to avoid offending their audiences by appearing to have gone to school. Thus, Adlai Stevenson, who incautiously allowed intelligence and learning and wit to peep out of his speeches, found the American people
id
and name
attributes have "user-content-"
prefixed to their value.sub
or sup
tags are allowed.ul
or ol
tags are allowed.Allowed Element | Allowed Attributes |
---|---|
All allowed elements | abbr , accept , accept-charset , accesskey , action , align , alt , axis , border , cellpadding , cellspacing , char , charoff , charset , checked , clear , color , cols , colspan , compact , coords , datetime , dir , disabled , enctype , for , frame , headers , height , hreflang , hspace , id , ismap , itemprop , label , lang , maxlength , media , method , multiple , name , nohref , noshade , nowrap , open , prompt , readonly , rev , rows , rowspan , rules , scope , selected , shape , size , span , start , summary , tabindex , title , type , usemap , valign , value , vspace , width |
a |
As above plus href (must be github-mac , github-windows , http , |
GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.