This file contains 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
class ExpandableText extends HTMLElement { | |
private shadow: ShadowRoot; | |
private container: HTMLDivElement; | |
private readMoreBtn: HTMLSpanElement; | |
private expanded: boolean; | |
private containerLargerThanText: boolean; | |
constructor() { | |
super(); | |
this.shadow = this.attachShadow({ mode: 'open' }); |
This file contains 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
# Create a 1GiB Swap File | |
# Lightsail ubuntu image doesn't boot with swap. | |
# If you run out of RAM, the system hangs OOM. | |
sudo fallocate -l 1G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo cp /etc/fstab /etc/fstab.bak | |
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am peteygao on github. | |
* I am pyg (https://keybase.io/pyg) on keybase. | |
* I have a public key ASD5uulFcfkEJ-omky9YHgW4ZwaBSf4K47Jo-bhaqe7twQo | |
To claim this, I am signing this object: |
This file contains 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
CSV Import | |
Empty State | |
submits good CSV -> Modal Closes | |
submits bad CSV -> Modal Shows Error | |
Modal Closes | |
Modal Shows Error | |
User Manually Clicks on Modal to Dismiss -> Empty State |
This file contains 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
watch -n 1 cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq # including logical processors (HyperThreading) | |
watch -n 1 cat /sys/bus/platform/devices/coretemp.0/hwmon/hwmon1/temp{1,2,3}_input # temp1 is the highest core's temp | |
alsamixer # Terminal audio mixer (if the volume setting doesn't show up in desktop UI) |
This file contains 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
remove control = Control_L | |
remove mod1 = Alt_L | |
keycode 37 = Alt_L | |
keycode 64 = Control_L | |
add control = Control_L | |
add mod2 = Alt_L | |
clear lock | |
keycode 66 = BackSpace |
This file contains 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
** Invoke gems:melbourne (first_time) | |
** Execute gems:melbourne | |
/home/pi/rubinius-3.19/staging/bin/rbx ./extconf.rbc | |
make && make install | |
compiling var_table.cpp | |
compiling symbols.cpp | |
compiling grammar.cpp | |
compiling melbourne.cpp | |
compiling visitor.cpp | |
compiling encoding_compat.cpp |
This file contains 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
ββββββββββββββββββββββ | |
βββββββββββββββββββββββββ | |
βββββββββββββββββββββββββββ | |
ββββββββββββββββββββββββββββ | |
βββββββββββββββββββββββββββββ | |
ββββββββββββββββββββββββββββββ | |
ββββββββββββββββββββββββββββββ | |
ββββββββββββββββββββββββββββ | |
βββββββββββββββββββββββββββ | |
ββββββββββββββββββββββββββββ |
This file contains 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
RUBINIUS 3.19 MRI 2.3.0 | |
Warming up '#sum 10 million elements' Warming up '#sum 10 million elements' | |
Average of 3 runs: 0.8526433626666666 Average of 3 runs: 0.7457792716666667 | |
================================================== ================================================== | |
Warming up '#md5 200k elements with NO threading' Warming up '#md5 200k elements with NO threading' | |
Average of 3 runs: 1.4279883816666665 Average of 3 runs: 0.2355165813333333 | |
================================================== ================================================== | |
Warming up '#md5 200k elements with 1 thread' Warming up '#md5 200k elements with 1 thread' | |
Average of 3 runs: 3.084292838666667 Average of 3 runs: 0.7009185860000001 | |
================================================== ================================================== |
This file contains 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
def bench name | |
warmup = yield | |
puts "Warming up '##{name}'" | |
GC.start | |
first = yield | |
GC.start | |
second = yield | |
GC.start | |
third = yield |
NewerOlder