Skip to content

Instantly share code, notes, and snippets.

View taufikherjanto's full-sized avatar

Taufik Herjanto taufikherjanto

View GitHub Profile
@taufikherjanto
taufikherjanto / gist:dc9521475ba8380406ce55b4fcc4a3ee
Created December 12, 2024 18:25
cloud-init challenge for user access ubuntu & user challenge04
hostname: challenge4-ubuntu22
# Add user and sudo access
users:
- default
- name: challenge04
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCi4bsvYa6bHoWXFSUqTheJ7pTc0c9YJVTVTvmUNSdnGQpnqBRtc6IS/0gfpj/s9A1D/S0SflRE4bunMxXjGwsMAWXv47WVnpooLFdUkvwhUkFJDJtYFzpk0RPFVw3uggL7+4rDu9ok5v8KFbSsukMe2kbtuji6U4DINhNKVa9LrFGe8fPfxd2kOvr05a7XsjDLiGJkAAIo3V+nAJIYfA3lf4mEdcBcfCn6Y+7Ndn0XToVdW0H1CpQqiQbXTt9tgeTolHielPKOhJVPJhKpYLKhl/jKPyqtPbQgHXik83favKvEFUvZ+2WHrAVDIcLnhoKfoXxjRfxHYLK13ljYoY7If4NIrEX9mppVdss/34YomjvDIIAZhnPHKbrht5sZSxgeizHSmHVBOLGRTA0Oj4ITn9b57GsnG7Q1Vo39y6DQMfmBXR1I3dxuGrcRfGpboCnO4IaOvb97xeN5/w/coPxuMNtGIxAKpKUoZpuf57wrtQ/Lq/i9jm6Ob4ML5gWGcXs= student@pod-taufikherjanto-controller
passwd: academy!@#
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
lock_passwd: false
@taufikherjanto
taufikherjanto / backup-dev.bat
Created March 24, 2021 17:45 — forked from leekelleher/backup-dev.bat
Personal batch script to quickly back-up my MSSQL database and wwwroot files, (typically for use with Umbraco).
:: ###### BACK-UP JOB ######
@ECHO OFF
:: Set the constants
SET BACKUP_DIR=C:\path\to\_backup
SET TEMP_DIR=%BACKUP_DIR%\TEMP
SET TODAY=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
SET ARCHIVE_DIR=%BACKUP_DIR%\%TODAY%
SET WWWROOT_NAME="ProjectName"
SET WWWROOT_SOURCE=C:\path\to\wwwroot
-- Using the REPLICATE function to indent with a '. ' for each level
WITH WBSProject(Id, name, Parentid, Level, TreePath) AS (
SELECT
id as Id,
name,
parentid,
0 as Level,
cast(name as varchar(1024)) as TreePath
FROM port_project
WHERE parentid = 0
@taufikherjanto
taufikherjanto / cte_of_wbsproject.sql
Last active March 15, 2021 08:47
CTE Tree Path WBS
WITH wbsproject(id, NAME, parentid, level, treepath) AS (
SELECT id,
NAME,
parentid,
0 AS LEVEL,
Cast(NAME AS VARCHAR(1024)) AS treepath
FROM port_project
WHERE parentid = 0
UNION ALL -- and now for the recursive part
SELECT d.id,
Your Telegram History
03.10.2016 17:00:15, Nur Rahmat Taufik(you): undefined
03.10.2016 17:16:40, Muhammad Surya: selamat datang semuanya 😊
03.10.2016 17:30:04, Muhammad: undefined
03.10.2016 17:30:10, Muhammad: Tes
03.10.2016 17:30:30, Muhammad Surya: Makin rame
03.10.2016 17:30:41, Muhammad Surya: tersisa 10 quota lagi :D
03.10.2016 17:30:50, Muhammad Surya: 5 dari luar 5 dari komunitas
03.10.2016 17:31:03, Muhammad: Seeeppp👍
<?php
interface Segitiga {
public function calculate();
}
class Keliling implements Segitiga
{
private $a;
private $b;
<?php
interface Hitung {
public function calculate();
}
class Jumlah implements Hitung
{
private $a;
private $b;

Keybase proof

I hereby claim:

  • I am taufikherjanto on github.
  • I am taufikherjanto (https://keybase.io/taufikherjanto) on keybase.
  • I have a public key whose fingerprint is 92C7 FC7B 1C9F 884E 0342 7034 5780 71C7 8557 8FA0

To claim this, I am signing this object:

server {
listen 80 default; ## listen for ipv4; this line is default and implied
listen [::]:80 default ipv6only=on; ## listen for ipv6
# Make site accessible from http://localhost/
server_name localhost;
server_name_in_redirect off;
charset utf-8;
user www-data;
# As a thumb rule: One per CPU. If you are serving a large amount
# of static files, which requires blocking disk reads, you may want
# to increase this from the number of cpu_cores available on your
# system.
#
# The maximum number of connections for Nginx is calculated by:
# max_clients = worker_processes * worker_connections
worker_processes 1;