Skip to content

Instantly share code, notes, and snippets.

View adityadaniel's full-sized avatar
🛠️

Daniel Aditya Istyana adityadaniel

🛠️
View GitHub Profile
@adityadaniel
adityadaniel / sync_base.sh
Created April 23, 2024 04:50
Sync current feature branch with latest changes from base branch
#!/bin/bash
function sync_base() {
parent=$(git show-branch | grep '*' | grep -v "$(git rev-parse --abbrev-ref HEAD)" | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//')
current=$(git rev-parse --abbrev-ref HEAD)
echo "base $parent, current: $current"
echo "Switching to parent: $parent, make sure you already commit all your work"
git checkout $parent && git pull
#!/bin/bash
#Infinite Loop
while true
do
echo "Memulai pengecekan saldo Ore.."
ore --keypair ~/.config/solana/id.json rewards
echo "Memuat ulang..."
# Opsional: melakukan delay sleep selama beberapa detik untuk menghindari spam
@adityadaniel
adityadaniel / dependencies.stencil
Created January 31, 2023 15:56
Test Dependency TCA Sourcery Template
{% for type in types.all where type.implements.DependencyKey %}
#if DEBUG
extension {{ type.name }}: TestDependencyKey {
{{ type.accessLevel }} static let testValue = {{ type.name }}(
{% for var in type.variables %}
{% if var.typeName.closure.actualReturnTypeName|contains:"Void"| %}
{{ var.name }}: unimplemented("\(Self.self).{{ var.name }} is unimplemented", placeholder: ())
{% elif var.typeName.closure.actualReturnTypeName|contains:"Effect" %}
{{ var.name }}: unimplemented("\(Self.self).{{ var.name }} is unimplemented", placeholder: Effect.none)
{% elif var.typeName.closure.actualReturnTypeName.isArray %}
@adityadaniel
adityadaniel / panic-roam.css
Created April 3, 2020 02:54
Roam Panic Bear without media queries
.roam-body .roam-app .roam-sidebar-container .roam-sidebar-content .log-button {
padding: 8px 20px;
font-weight: 900;
cursor: pointer;
font-size: 16px;
color: #f9b637;
}
/* Background color for the rest of body */
struct Theme {
static func apply(to window: UIWindow) {
window.tintColor = Colors.purple
UIView.appearance().backgroundColor = Colors.gray4
let tabBar = UITabBar.appearance()
tabBar.barTintColor = Colors.gray3
let navBar = UINavigationBar.appearance()
@adityadaniel
adityadaniel / delete_blank_rows_more_than_8000.vb
Created July 10, 2018 01:28
VBA excel to delete blank rows more than 8000 cell
Sub del_COLA_empty()
'D McRitchie http://www.mvps.org/dmcritchie/excel/delempty.htm 2004-01-10
'based on Matt Neuburg, PhD http://www.tidbits.com/matt Aug 3, 1998
'Loop required due to MS KB http://support.microsoft.com/?kbid=832293
Dim i As Long
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual 'pre XL97 xlManual
i = Cells.SpecialCells(xlCellTypeLastCell).Row
For i = i To 1 Step -8000
On Error Resume Next 'in case there are no blanks
/* Settings */
:root {
--offset: 1.5rem;
--max_width: 72rem;
--columns: 6;
--gutter: .5rem;
--baseline: 3rem;
--baseline-shift: 2rem;
--color: hsla(204, 80%, 72%, 0.25);
}
DECLARE
nama varchar2(100);
v_fname employees.first_name%type;
v_lname employees.last_name%type;
BEGIN
SELECT first_name,
last_name INTO v_fname,
v_lname
FROM employees
declare
v_fname employees.first_name%type;
v_lname employees.last_name%type;
begin
SELECT first_name, last_name into v_fname, v_lname from employees WHERE last_name = 'Chen';
dbms_output.put_line('Nama lengkap saya adalah: ' || v_fname || ' ' || v_lname);
end;
DECLARE
x number;
v_fname employees.first_name%type;
v_lname employees.last_name%type;
BEGIN
SELECT first_name,
last_name INTO v_fname,
v_lname