This file contains hidden or 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
{ | |
"database": { | |
"rules": "database.rules.json" | |
}, | |
"hosting": { | |
"public": "build", | |
"rewrites": [ | |
{ | |
"source": "**", |
This file contains hidden or 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
#if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi | |
# Aliases | |
alias c='clear' | |
alias h='cd ~' | |
alias co='cd ~/Documents/Code' | |
alias cw='cd ~/Documents/Code/Web' | |
alias yup='yarn global upgrade-interactive' | |
alias dockerclean='docker rm $(docker ps -a -q) -f' |
This file contains hidden or 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
<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); | |
} |
This file contains hidden or 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
var leaveTypes = ['Cuti tahunan', 'Cuti sakit', 'Remote', 'Cuti tidak berbayar', 'Maternity Leave'] | |
$('#see-more-list').append('<input style="border:1px solid gray; margin:10px" id="slksearch" type="text" placeholder="Search by name" />') | |
$('#see-more-list').append('<select id="slktype"><option>All</option>'+ leaveTypes.map(l => '<option>'+l+'</option>').join('')+'</select>') | |
$('#see-more-list').append('<span style="margin: 5px" id="slktotal"></span>') | |
$("#slksearch").on('input', () => { | |
var val = $('#slksearch').val() | |
handleOnChange(val, $('#slktype').val()) | |
}) |
This file contains hidden or 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
fetch('https://www.tokopedia.com/blog/search/keuangan/feed/rss2/').then(a => a.text()).then(txt => { | |
let parser = new DOMParser(); | |
let res = parser.parseFromString(txt, 'text/xml'); | |
let arr = []; | |
let doc = res.getElementsByTagName('item'); | |
let fields = ['title', 'description', 'link', 'pubDate']; | |
for (let i=0;i<doc.length;i++) { | |
let obj = {}; | |
let cats = []; | |
let catDoc = doc[i].getElementsByTagName('category'); |
This file contains hidden or 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
function majemuk(sum, bunga, n) { return sum * ((1+bunga) ** n) } |
This file contains hidden or 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
function css2js(str) { | |
const seg = str.split(';').map(a => { | |
const k = a.split(/:\s+/) | |
const b = k[0].split('-') | |
for (var i=1;i<b.length;i++) { | |
b[i] = b[1][0].toUpperCase() + b[i].substring(1) | |
} | |
k[0] = b.join('') | |
return k | |
}) |
This file contains hidden or 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
# https://sujipthapa.co/blog/git-pro-tip-show-your-branch-on-linux-ubuntu-terminal | |
# Aliases | |
alias cgo='cd ~/Documents/Code/go/src/github.com/antonybudianto' | |
alias c='clear' | |
alias h='cd ~' | |
alias co='cd ~/Documents/Code' | |
alias cw='cd ~/Documents/Code/Web' | |
alias yup='yarn global upgrade-interactive' | |
alias dockerclean='docker rm $(docker ps -a -q) -f' |
This file contains hidden or 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
import React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import withStyles from 'isomorphic-style-loader/lib/withStyles'; | |
import indexCss from './index.css'; | |
import css from './App.css'; | |
import rabbitCss from './Rabbit.css'; | |
class App extends Component { | |
render() { |