Skip to content

Instantly share code, notes, and snippets.

View hardzal's full-sized avatar
🔎
Learning

M Rizal hardzal

🔎
Learning
View GitHub Profile
@hardzal
hardzal / solution1.cpp
Created March 15, 2022 15:03
iseng_solution
#include<iostream>
using namespace std;
int main() {
int p=1, q =0, r = 9, s=1;
for(int i = 1; i <= 9; i++) {
for(int j = 1; j <= 9; j++) {
if (i==j) {
@hardzal
hardzal / 📊 Weekly development breakdown
Last active September 4, 2021 00:40
Weekly Development
PHP 6 hrs 53 mins ████████████▎░░░░░░░░ 58.9%
Blade T... 4 hrs 2 mins ███████▎░░░░░░░░░░░░░ 34.6%
Bash 28 mins ▊░░░░░░░░░░░░░░░░░░░░ 4.0%
Markdown 5 mins ▏░░░░░░░░░░░░░░░░░░░░ 0.8%
JSON 4 mins ▏░░░░░░░░░░░░░░░░░░░░ 0.7%
@hardzal
hardzal / multiple_ssh_setting.md
Created February 23, 2021 12:30 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@hardzal
hardzal / getAllData.json
Last active December 6, 2019 05:37
API AsikPBJ
{
"total": 3,
"data": [{
"id": "1",
"name": "Grafik Pie",
"type": "doughnut",
"judul_data": "Contoh1, Contoh2, Contoh3",
"created_at": "2019-11-30 06:37:23",
"updated_at": "2019-11-30 06:46:38"
},

Installation LAMP Stack

Step 1

sudo apt-get update

Step 2

sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev

Step 3

sudo apt-get install -y apache2

@hardzal
hardzal / docker-help.md
Created August 17, 2019 07:23 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@hardzal
hardzal / webdev_online_resources.md
Created August 17, 2019 07:22 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@hardzal
hardzal / mongodb_cheat_sheet.md
Created August 17, 2019 03:24 — forked from bradtraversy/mongodb_cheat_sheet.md
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@hardzal
hardzal / soal1.cpp
Last active May 20, 2019 03:07
Soal Pra UAS Analisa Algoritma
// soal nomer satu
#include<bits/stdc++.h>
using namespace std;
int main()
{
int i, n, nil, temp;
int diff = 0;
vector<int> nilai;
cin >> n;