Skip to content

Instantly share code, notes, and snippets.

View antonybudianto's full-sized avatar
💪
Build up!

Antony Budianto antonybudianto

💪
Build up!
View GitHub Profile
@antonybudianto
antonybudianto / console-warn-to-log.js
Last active December 8, 2022 05:09 — forked from mksoni88/overridelog.js
Override console.warn to log so that it is not aliased to error
const _log = console.log;
global.console.warn = function() {
_log.apply(null, arguments);
};
@antonybudianto
antonybudianto / nginx.conf
Created January 20, 2019 04:57 — forked from johngrimes/nginx.conf
Ideal Nginx configuration for JavaScript single-page app
server {
listen 80;
root /usr/share/nginx/html;
gzip on;
gzip_types text/css application/javascript application/json image/svg+xml;
gzip_comp_level 9;
etag on;
location / {
try_files $uri $uri/ /index.html;
}
server {
location ~* (serviceworker\.js)$ {
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
expires off;
proxy_no_cache 1;
}
}
@antonybudianto
antonybudianto / Remove all git tags
Created June 14, 2018 12:31 — forked from okunishinishi/Remove all git tags
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@antonybudianto
antonybudianto / parent.html
Created January 23, 2018 03:42 — forked from kaku87/parent.html
javascript popup close callback event.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Popup Example</title>
</head>
<body>
<script>
function popupCallback(str){
alert("This is callback:" + str);
}