Skip to content

Instantly share code, notes, and snippets.

View frendhisaido's full-sized avatar

Frendhi frendhisaido

View GitHub Profile
@frendhisaido
frendhisaido / test.js
Created December 7, 2022 03:49 — forked from jmyrland/test.js
Socket-io load test?
/**
* Modify the parts you need to get it working.
*/
var should = require('should');
var request = require('../node_modules/request');
var io = require('socket.io-client');
var serverUrl = 'http://localhost';
@frendhisaido
frendhisaido / workers.sql
Last active July 24, 2021 17:56
JDS BI_DEV_SQL
SELECT name FROM employees
WHERE id NOT IN(SELECT managerId FROM employees WHERE managerId IS NOT NULL)
@frendhisaido
frendhisaido / removeButton.js
Created July 24, 2021 17:55
JDS BI_DEV_Javascript
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 = `
@frendhisaido
frendhisaido / unique_names.py
Created July 24, 2021 17:41
JDS BI_DEV_Python
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 / change-background-color-on-scroll.markdown
Created September 18, 2020 06:46
change background color on scroll
2012-04-02T06:52:32Z||oprator berpengalaman telkomsel selain excel indosat saya mmbutuhkan operator marketing yang ckp handal berpengalaman
2012-04-02T07:12:42Z||rt pakai indosat internet broom bisa internetan cepat tanpa putus didukung dengan
2012-04-02T07:00:12Z||pakai indosat internet broom bisa internetan cepat tanpa putus didukung dengan jaringan 5g dijamin internetan wusshhhhh
2012-04-02T07:03:31Z||edit jalur akses internet indosat gunakan proxy ip add 195 189 142 132 port ip 80 yang lain biarkan seperti aslinya
2012-04-02T06:56:49Z||haha <makian> oprator berpengalaman telkomsel selain indosat bth operator marketing yang pengalaman
2012-04-02T07:22:10Z||rt pakai indosat internet broom bisa internetan cepat tanpa putus didukung dengan jaringan 5g dijamin internetan wusshhhhh
2012-04-02T07:32:05Z||di atmajaya abisnya mirip sangat aula indosat gambarnya tadi haha
2012-04-02T07:28:44Z||saya cinta karo indosat mergo terpaksa
2012-04-02T09:43:10Z||pan sarua indosat mnh haha dibawain ngan peje hela ngk
@frendhisaido
frendhisaido / vhost.com.conf
Last active November 13, 2018 08:56
virtual host docker app
<VirtualHost *:80>
ServerName vhost.com
<Proxy *>
AddDefaultCharset off
Order deny,allow
Allow from all
</Proxy>
<Location />
@frendhisaido
frendhisaido / Dockerfile
Last active September 13, 2018 08:34
fusionauth docker-compose.yml
# 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"

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 February 12, 2018 01:23 — forked from andsens/dump.sh
Backup all MySQL databases into separate files
#!/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