Skip to content

Instantly share code, notes, and snippets.

Avatar

Frendhi frendhisaido

View GitHub Profile
@frendhisaido
frendhisaido / removeButton.js
Created Jul 24, 2021
JDS BI_DEV_Javascript
View removeButton.js
function setup() {
// Write your code here.
const removeBtns = document.querySelectorAll('.remove');
removeBtns.forEach(el => el.addEventListener('click', event => {
event.target.parentElement.remove()
}));
}
// Example case.
document.body.innerHTML = `
View unique_names.py
def unique_names(names1, names2):
# rubah ke set, dan jadi unique values
first_set = set(names1)
second_set = set(names2)
second_only = second_set - first_set # yang cuma ada di list kedua
combined = names1 + list(second_only) # gabung lagi sama yg pertama
unique_list = list(set(combined)) # pastiin unique buat edge cases di tiap list ada duplikat
return unique_list
@frendhisaido
frendhisaido / workers.sql
Last active Jul 24, 2021
JDS BI_DEV_SQL
View workers.sql
SELECT name FROM employees
WHERE id NOT IN(SELECT managerId FROM employees WHERE managerId IS NOT NULL)
@frendhisaido
frendhisaido / vhost.com.conf
Last active Nov 13, 2018
virtual host docker app
View vhost.com.conf
<VirtualHost *:80>
ServerName vhost.com
<Proxy *>
AddDefaultCharset off
Order deny,allow
Allow from all
</Proxy>
<Location />
@frendhisaido
frendhisaido / Dockerfile
Last active Sep 13, 2018
fusionauth docker-compose.yml
View Dockerfile
# FROM https://github.com/FusionAuth/fusionauth-containers/tree/master/docker/fusionauth/fusionauth-app/Dockerfile
# FusionAuth Dockerfile
#
# Example use: docker build -t fusionauth .
# Once built, to start: docker run -p 9011:9011 -it fusionauth
FROM ubuntu:18.04
LABEL description="Create an image running FusionAuth with embedded search engine. \
Installs FusionAuth Search, FusionAuth App"
View Web Development Contract.md

Web Design Contract

Based on Contract Killer, an open-source contract for web developers.

Summary:

I’ll always do my best to fulfill your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. I have no desire to trick you into signing something that you might later regret. What I do want is what’s best for both parties, now and in the future.

So in short;

You ([CLIENT COMPANY]), located at [CLIENT ADDRESS] are hiring me ([DEVELOPER]) located at [DEVELOPER ADDRESS] to design and develop a web site for the estimated total price of [QUOTE] as outlined in our previous correspondence.

@frendhisaido
frendhisaido / dump.sh
Created Feb 12, 2018 — forked from andsens/dump.sh
Backup all MySQL databases into separate files
View dump.sh
#!/bin/sh
## backup each mysql db into a different file, rather than one big file
## as with --all-databases. This will make restores easier.
## To backup a single database simply add the db name as a parameter (or multiple dbs)
## Putting the script in /var/backups/mysql seems sensible... on a debian machine that is
## Create the user and directories
# mkdir -p /var/backups/mysql/databases
# useradd --home-dir /var/backups/mysql --gid backup --no-create-home mysql-backup
## Remember to make the script executable, and unreadable by others
@frendhisaido
frendhisaido / INSTALLATION.md
Created Apr 30, 2016 — forked from DenisIzmaylov/INSTALLATION.md
OS X 10.11 El Capitan: fresh install with Node.js (io.js) Developer Environment
View INSTALLATION.md

OS X 10.11 (El Capitan) / Node.js and io.js Developer Environment

Custom recipe to get OS X 10.11 El Capitan running from scratch with useful applications and Node.js Developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after fresh install.

Content

@frendhisaido
frendhisaido / README.md
Last active Apr 30, 2016
Anggaran Perjalanan Dinas (2012)
View README.md

Infografik tentang penyelewengan dana anggaran perjalanan dinas.

Namun tujuan utamanya, untuk tutorial basic D3.js. :)

http://danaro.web.id/wp