- use
apt install ncdu
or
- Get to the root of your machine by running
cd / - Run
sudo du -h --max-depth=1 | sort -rh - Note which directories are using a lot of disk space.
cdinto one of the big directories.
| Write a Markdown file for technical documentation of "any-zkvm" library. | |
| The goal of this document is to teach future engineers to understand and maintain this library correctly. | |
| This document should also include {@docs: C4 Model} diagrams in {@docs: Mermaid} syntax at three different levels: | |
| 1. System context diagram | |
| 2. Container diagram | |
| 3. Component diagram |
| // Tokopedia | |
| function removeAdsType1() { | |
| var adsType1 = document.querySelectorAll('a[label-atm="taProduct"]'); | |
| adsType1.forEach(function (e) { | |
| e.parentNode.remove(e); | |
| }); | |
| } | |
| window.setInterval(removeAdsType1, 10000); | |
| function removeAdsType2() { |
| // RestTemplate interceptor | |
| public class CustomRequestInterceptor implements ClientHttpRequestInterceptor { | |
| @Override | |
| public ClientHttpResponse intercept( | |
| final HttpRequest request, | |
| final byte[] body, | |
| final ClientHttpRequestExecution execution | |
| ) throws IOException { | |
| log.info("INTERCEPT {} {} {} body {}", request.getMethodValue(), request.getURI(), request.getHeaders(), |
Expected state mixing local transaction and external API
| \ | DB succeed | DB failed |
|---|---|---|
| API succeed | DB changed, API changed | DB unchanged, API unchanged |
| API failed | DB unchanged, API unchanged | DB unchanged, API unchanged |
| // Put in build.gradle | |
| // Log timings per task. | |
| class TimingsListener implements TaskExecutionListener, BuildListener { | |
| private Clock clock | |
| private timings = [] | |
| @Override | |
| void beforeExecute(Task task) { | |
| clock = new org.gradle.util.Clock() |
| var EVENTS = [ | |
| // source: https://www.w3.org/TR/html5/semantics-embedded-content.html#media-elements-event-summary | |
| 'loadstart', 'progress', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'loadedmetadata', 'loadeddata', 'canplay', 'canplaythrough', 'playing', 'waiting', 'seeking', 'seeked', 'ended', 'durationchange', 'timeupdate', 'play', 'pause', 'ratechange', 'resize', 'volumechange', | |
| // source: https://github.com/videojs/video.js/search?q=fires&unscoped_q=fires | |
| 'beforemodalopen', 'modalopen', 'beforemodalclose', 'addtrack', 'modechange', 'change', 'selectedchange', 'enabledchange', 'close', 'beforepluginsetup', 'pluginsetup', 'dispose', 'removetrack', 'sourceset', 'load', 'slideractive', 'sliderinactive', 'statechanged', 'playerresize', 'ready', | |
| // source: https://support.brightcove.com/advertising-ima3-plugin | |
| 'adstart', 'adend', 'readyforpreroll', 'ima3-ready', 'ima3error', 'ima3-ad-error', 'ads-request', 'ads-load', 'ads-ad-started', 'ads-ad-ended', 'ads-pause', 'ads-play', 'ads-ad-skippe |
| javascript:document.querySelectorAll('.load-diff-button').forEach(node => node.click()) |
| // git: To delete all local branches that are already merged into the currently checked out branch: | |
| git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d | |
| // git: Delete local git branch | |
| git branch -D <branch_name> | |
| // git: Delete remote git branch | |
| git push <remote_name/origin> --delete <branch_name> | |
| // git: Pick specific file from another branch |