- 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.
cd
into one of the big directories.
// 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 |
/* | |
Tested on Chrome only | |
1. Install Custom JavaScript for websites | |
https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija?utm_source=chrome-app-launcher-info-dialog | |
2. Open https://chat.kaskus.co.id | |
3. Click on "cjs" icon | |
4. Paste the code in this file | |
5. Click save | |
6. Enjoy your shortcuts! |