Skip to content

Instantly share code, notes, and snippets.

View cuppyzh's full-sized avatar
🎯
Focusing

cuppyzh

🎯
Focusing
View GitHub Profile
@cuppyzh
cuppyzh / turnonscript.ps1
Created July 17, 2024 03:42
AWS StepFunction - start EC2- Script
param (
[string]$servers = ""
)
#
$serverMapping = @{}
$serverMapping["Server_1"] = "";
$serverMapping["Server_2"] = "";
$startServerStepFunctionArn = "";
using System;
using System.Web;
using HtmlAgilityPack;
public static class HtmlSanitizer
{
string maliciousHtml = @"
<h1 style='color:red;'>Welcome!</h1>
<script>alert('XSS Attack!');</script>
<a href='javascript:alert(\"Hacked!\");'>Click me</a>
@cuppyzh
cuppyzh / Get-Contact-List.ps1
Created October 25, 2023 06:48
Linkedin Banner script
Write-Host "Email : Yusuf Anugrah Putra Aditama".PadLeft($host.ui.rawui.windowsize.width)
Write-Host "Github : cuppzyh ".PadLeft($host.ui.rawui.windowsize.width)
Write-Host "Discord : cuppyzh ".PadLeft($host.ui.rawui.windowsize.width)
Write-Host "https://cuppyzh.dev ".PadLeft($host.ui.rawui.windowsize.width)
@cuppyzh
cuppyzh / GitStatsExtend.ps1
Last active October 23, 2023 12:15
Powershell script to extract git status from 2 commit
# Put this file in your git repository
# This Powershell script is to analyze git changes
# It will export 2 kind of reports:
# 1. Original Git changes tatus (code and file changes)
# 2. Total line of file that affected by changes
# Filtered by whitelisted file
# Parameter
# commitStart = commit hash from branch A
# commitEnd = commit hash from branch B
@cuppyzh
cuppyzh / Limit Break Macro
Last active February 6, 2023 15:17
FF14 Macro
preview: https://media.discordapp.net/attachments/1071840686686613655/1072071747916005426/image.png
/micon "Limit Break"
/ac "Limit Break" <t>
<se.9> いきまーす!!! <se.9>
∧∧ ∩
( °ω Β°) /
∧_∧ βŠ‚ γƒŽ ∧_∧
('(°ω Β°ο½€βˆ© (぀ γƒŽ βˆ©ο½€Β°Ο‰ Β°)')
∧_∧ δΈΆ く ( γƒŽ > / ∧_∧
@cuppyzh
cuppyzh / gist:e001842bfeb0f588da878c99b1c0beb6
Last active May 20, 2021 06:38
Windows Terminal Setup.md
https://www.notion.so/Windows-Terminal-7dd3caa0b5bf40a7a0effa39a8b0c0dc
@cuppyzh
cuppyzh / gist:186f3aea5fb26022f3ca4271a0bd352a
Created November 3, 2020 17:19 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@cuppyzh
cuppyzh / chmod-400.cmd
Created October 27, 2020 07:49 — forked from jaskiratr/chmod-400.cmd
Set permission of file equivalent to chmod 400 on Windows.
# Source: https://stackoverflow.com/a/43317244
$path = ".\aws-ec2-key.pem"
# Reset to remove explict permissions
icacls.exe $path /reset
# Give current user explicit read-permission
icacls.exe $path /GRANT:R "$($env:USERNAME):(R)"
# Disable inheritance and remove inherited permissions
icacls.exe $path /inheritance:r
@cuppyzh
cuppyzh / workers.sql
Created January 22, 2019 17:45
JDS SQL#2
-- Write only the SQL statement that solves the problem and nothing else.
SELECT name
FROM employees
WHERE Id NOT IN (select distinct(managerId) from employees where managerId is not null);
@cuppyzh
cuppyzh / students.sql
Created January 22, 2019 17:45
JDS SQL#1
-- Write only the SQL statement that solves the problem and nothing else.
SELECT COUNT(*)
FROM students
WHERE firstName = "John";