Combine default parameters and destructuring for a compact version of the defaults / overrides pattern.
function foo ({
bar = 'no',
baz = 'works!'
} = {}) {
From e4db4f07e77feb1c126e7afbf441e9eae34b4e57 Mon Sep 17 00:00:00 2001 | |
From: Kelvie Wong <[email protected]> | |
Date: Sun, 2 Oct 2022 13:23:25 -0700 | |
Subject: [PATCH] Add a lockdown_hibernate parameter | |
This allows the user to tell the kernel that they know better (namely, | |
they secured their swap properly), and that it can enable hibernation. | |
Signed-off-by: Kelvie Wong <[email protected]> | |
--- |
! 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 |
#!/bin/sh | |
# Place in /etc/motd.d and drop the .sh suffix. | |
echo -e "\n\033[1mWelcome to Gentoo Linux!\033[0m" | |
echo -e "\nThis server is maintained by \033[1m$(cat /etc/maintainer)\033[0m." | |
echo -e "Contact \033[1m$(cat /etc/maintainer-address)\033[0m for support." | |
echo en "\n \033[1;32m*\033[0m " |