Skip to content

Instantly share code, notes, and snippets.

View async.js
// or even better: https://blog.risingstack.com/mastering-async-await-in-nodejs/
// https://github.com/iagodahlem/clima-cli/blob/master/src/utils/weather.js
// https://github.com/axios/axios
async function f() {
let result = await e(1500);
let output = await d(result);
View delete-local-branches.sh
git branch --no-color | while read sha ref; do
git branch -D $sha
done
@bitbonsai
bitbonsai / .fun_npm_update.sh
Created Jun 2, 2018
Update all npm global packages
View .fun_npm_update.sh
function npm_update() {
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f2)
do
npm -g install "$package"
done
}
View coolest-ol-ever.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>test</title>
</head>
<body>
<style>
View 16.log
me at node1 in ~
NSS_SDB_USE_CACHE=YES strace -fc -e trace=access curl 'https://foobar.booking.com/' > /dev/null
Process 14247 attached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00 0.000009 0 32 30 access
------ ----------- ----------- --------- --------- ----------------
100.00 0.000009 32 30 total
View 16.log
me at node1 in ~
NSS_SDB_USE_CACHE=YES strace -fc -e trace=access curl 'https://foobar.booking.com/' > /dev/null
Process 14247 attached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00 0.000009 0 32 30 access
------ ----------- ----------- --------- --------- ----------------
100.00 0.000009 32 30 total
View 15.log
while (true); do
echo "$graphite_name_space.$(hostname|sed -e 's/\./_/g').dentry $(sudo slabtop -o | egrep 'dentry'|awk '{print $1}') $(date '+%s')"| nc 127.0.0.1 3002;
sleep 0.9;
done
View 14.log
me at node1 in ~
strace -fc -e trace=access curl 'https://foobar.booking.com/' > /dev/null
Process 2390 attached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00 0.003180 0 6647 6643 access
------ ----------- ----------- --------- --------- ----------------
100.00 0.003180 6647 6643 total
View 13.log
MEM | tot 94.3G | free 9.2G | cache 5.4G | dirty 18.1M | buff 15.1M | slab 75.7G | slrec 75.5G | shmem 4.1G | shrss 0.0M | shswp 0.0M |
View 12.log
Active / Total Objects (% used) : 388963608 / 415847504 (93.5%)
Active / Total Slabs (% used) : 19781213 / 19781213 (100.0%)
Active / Total Caches (% used) : 69 / 101 (68.3%)
Active / Total Size (% used) : 73098890.88K / 78163097.48K (93.5%)
Minimum / Average / Maximum Object : 0.01K / 0.19K / 15.88K
OBJS ACTIVE USE OBJ SIZE SLABS OBJ/SLAB CACHE SIZE NAME
414578178 387795876 0% 0.19K 19741818 21 78967272K dentry
244998 244998 100% 0.10K 6282 39 25128K buffer_head
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.