network:
ethernets:
eth0:
dhcp4: true
match:
This file contains hidden or 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
| alias dnsa='function _dnsA(){ echo "$(dig +short A $1)"; };_dnsA' # Find A records for a domain | |
| alias dnsc='function _dnsCNAME(){ echo "$(dig +short CNAME $1)"; };_dnsCNAME' # Find CNAME records for a domain | |
| alias digr='function _digRedirect(){ echo "$(curl -Ls -o /dev/null -w %{url_effective} $1)"; };_digRedirect' # Find redirect URL for a domain | |
| alias ip='ipconfig getifaddr en0' # Get local IP address | |
| alias ipe='dig @resolver4.opendns.com myip.opendns.com +short' # Get external IP address |
This file contains hidden or 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
| const delay = (ms) => new Promise((res) => setTimeout(res, ms)); | |
| async function execute(count = 0) { | |
| for (let i = 1; i < count; i++) { | |
| // Run logic here | |
| await delay(i * 1000); | |
| } | |
| } | |
| execute(10); |
This file contains hidden or 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
| findme () { | |
| echo "Internal IP: $(ifconfig en0 inet | grep inet | awk '{print $2}')" | |
| echo "External IP: $(dig @resolver4.opendns.com myip.opendns.com +short)" | |
| } | |
| findme |
This file contains hidden or 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
| unbind-key C-b | |
| set-option -g prefix C-f | |
| # Refresh with source file | |
| bind-key R source-file ~/.tmux.conf | |
| # Use zsh as default shell | |
| set-option -g default-shell /bin/zsh | |
| # Enable mouse support |
This file contains hidden or 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
| brew cask install adoptopenjdk/openjdk/adoptopenjdk8 | |
| brew cask install android-sdk | |
| # [alternative] echo to profile and source | |
| export JAVA_HOME=`/usr/libexec/java_home -v 1.8` | |
| export ANDROID_HOME=/usr/local/share/android-sdk | |
| echo y | sdkmanager "system-images;android-29;google_apis;x86" | |
| yes | sdkmanager --licenses |
This file contains hidden or 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
| from airflow import DAG | |
| from airflow.operators import BashOperator | |
| from datetime import datetime | |
| import os | |
| import sys | |
| args = { | |
| 'owner': 'airflow' | |
| , 'start_date': datetime(2017, 1, 27) | |
| , 'provide_context': True |
This file contains hidden or 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
| /** | |
| * Base64 encode/decode | |
| * Inspired by: https://github.com/davidchambers/Base64.js/blob/master/base64.js | |
| */ | |
| const chars = | |
| 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' | |
| export const Base64 = { | |
| btoa: (input) => { | |
| let str = input | |
| let output = '' |
This file contains hidden or 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
| function mapValues(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| result[key] = fn(obj[key], key); | |
| return result; | |
| }, {}); | |
| } | |
| function pick(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| if (fn(obj[key])) { |
NewerOlder