# https://unix.stackexchange.com/questions/5010/how-can-i-count-the-number-of-different-characters-in-a-file
# works for linux. There is a variation for MacOS in the link ^
sed 's/\(.\)/\1\n/g' text.txt | sort | uniq -c # sort -nr # uncomment this to sort the list by frequency
#!/bin/bash | |
#shows traffic on the specified device | |
function human_readable { | |
VALUE=$1 | |
BIGGIFIERS=( B K M G ) | |
CURRENT_BIGGIFIER=0 | |
while [ $VALUE -gt 10000 ] ;do | |
VALUE=$(($VALUE/1000)) |
##TCP FLAGS## | |
Unskilled Attackers Pester Real Security Folks | |
============================================== | |
TCPDUMP FLAGS | |
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere) | |
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere) | |
Pester = PSH = [P] (Push Data) | |
Real = RST = [R] (Reset Connection) | |
Security = SYN = [S] (Start Connection) |
const MY_DOMAIN = "agodrich.com" | |
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2" | |
const DISQUS_SHORTNAME = "agodrich" | |
addEventListener('fetch', event => { | |
event.respondWith(fetchAndApply(event.request)) | |
}) | |
const corsHeaders = { | |
"Access-Control-Allow-Origin": "*", |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
- Must have
Dockerfile
inside project, that able to rundocker built -t test:1.0.0 ./
- Image must be expose port as 80
- Image after build could run directly without any config file, config only accept to inject by environment variables
docker run -e "MYSQL_HOST=127.0.0.1" -e "MYSQL_USERNAME=root" test:1.0.0
- Must have Jenkins file follow this pattern
pipeline {
agent any
Important: I'm writing this when the last version of macOS (and the one I have installed) is Mojave. There is already a script which installs Mojave in a virtual machine here https://github.com/img2tab/okiomov. But if you are curios how to do everything manually to install High Sierra, then this guide may be useful.
After reading a few articles I ended up with these steps:
- On macOS, download the High Sierra installer (even if you have Mojave installed): https://itunes.apple.com/us/app/macos-high-sierra/id1246284741?ls=1&mt=12
- If the High Sierra Installer starts, quit it.
- Open "Disk Utility".
- Click on "File" > "New Image" > "Blank image...". Or just press cmd+N.
Author: Chris Lattner
To: [email protected]
From: Ahmed Fasih
Subject: Re: Programming Test Invitation
Hi there! Thanks for offering to let me take a HackerRank test for ABC, I appreciate the vote of confidence.
I'd never heard of HackerRank, but after you wrote two other employers sent me their own HackerRank tests. Having worked on those tests first (I considered them practice, for the real thing with ABC :), I'd like to check if you have flexibility in finding an alternative way to evaluate my basic coding chops.
This is because, as functional programmer and author Paul Chiusano says, "Programming is all about managing complexity" [1], but HackerRank is quite bad at measuring my ability to manage complexity. It asks for small algorithmic coding puzzles to be done in unnatural conditions including (1) time limits, (2) forbidding research on Wikipedia or StackOverflow, (3) forbidding collaboration, and (4) forbidding the use of libraries (Python and JavaScript e.g. are so different when confined to thei
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |