Combine default parameters and destructuring for a compact version of the defaults / overrides pattern.
function foo ({
bar = 'no',
baz = 'works!'
} = {}) {
! 5/3/2018, 9:36:51 AM https://twitter.com/ | |
twitter.com##.has-content.roaming-module.js-wtf-module.wtf-module.module | |
! 5/3/2018, 9:37:01 AM https://twitter.com/ | |
twitter.com##.trends.Trends.module | |
! 5/3/2018, 9:37:09 AM https://twitter.com/ | |
twitter.com##.js-moments-tab.moments > .js-dynamic-tooltip.js-tooltip.js-nav |
# Modern secure (OpenSSH Server 7+) SSHd config by HacKan | |
# Refer to the manual for more info: https://www.freebsd.org/cgi/man.cgi?sshd_config(5) | |
# Server fingerprint | |
# Regenerate with: ssh-keygen -o -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa -b 4096 | |
HostKey /etc/ssh/ssh_host_rsa_key | |
# Regerate with: ssh-keygen -o -f /etc/ssh/ssh_host_ed25519_key -N '' -t ed25519 | |
HostKey /etc/ssh/ssh_host_ed25519_key | |
# Log for audit, even users' key fingerprint |
class ChromeCastService { | |
constructor() { | |
this.castSession = null; | |
this.sessionRequest = new chrome.cast.SessionRequest(chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID); | |
const apiConfig = new chrome.cast.ApiConfig( | |
this.sessionRequest, | |
(session) => { // sessionListener | |
console.log('Received ChromeCast session', session) | |
this.castSession = session; |
# Scan for CVE-2017-0143 MS17-010 | |
# The vulnerability used by WannaCry Ransomware | |
# | |
# 1. Use @calderpwn's script | |
# http://seclists.org/nmap-dev/2017/q2/79 | |
# | |
# 2. Save it to Nmap NSE script directory | |
# Linux - /usr/share/nmap/scripts/ or /usr/local/share/nmap/scripts/ | |
# OSX - /opt/local/share/nmap/scripts/ | |
# |
__svn_ps1() { | |
if [[ -d .svn ]]; then | |
local url=$(svn info | awk '/URL:/ {print $2}') | |
local repo=$(echo $url | sed 's/^.*\/\(trunk\|branches\|tags\)/\1/') | |
if $SVN_PS1_SHOWDIRTYSTATE; then | |
svn st | grep -e '^[MA]' > /dev/null 2>&1 | |
local modified=$(echo $? | sed 's/0/+/' | sed 's/1//') | |
svn st | grep '^?' > /dev/null 2>&1 | |
local added=$(echo $? | sed 's/0/*/' | sed 's/1//') | |
fi |