Skip to content

Instantly share code, notes, and snippets.

@halilintar8
halilintar8 / rpmtoarch
Created October 16, 2025 10:28 — forked from zinovyev/rpmtoarch
Convert rpm package to Archlinux package (makepkg -s command required afterwards)
#!/usr/bin/env ruby
require "fileutils"
class Package
FILTERED_PARTS = %w[rpm x86_64]
INSTALL_SECTIONS = %w[pre_install post_install pre_upgrade
post_upgrade pre_remove post_remove].freeze
### Overview ###
In order to replicate from an AWS RDS database to an external server, you need 3 components, and to keep two things in mind:
**Components**
* RDS Master DB - `rds-master`
* RDS Read-Only Slave - `rds-slave`
* External DB Server - `external-db`
**Two Things to Keep in Mind**
* This process is fairly brittle and not fully supported by AWS except for temporary data extraction.
@halilintar8
halilintar8 / serangpenipu.php
Created November 2, 2023 04:38 — forked from ibnux/serangpenipu.php
php script untuk serang penipu yang pake bot telegram, pastikan ada gambar tai.jpg di sebelah filenya
<?php
ini_set('default_socket_timeout', 5);
while (true) {
$array = explode("\n", str_replace("\r","",file_get_contents("target.txt")));
foreach ($array as $a){
if(!empty(trim($a))){
$t = explode(" ", $a);
upload($t[0], $t[1]);
}
# Deploy a Compute Instance with a Remote Startup Script
# https://google.qwiklabs.com/focuses/1735?parent=catalog
# Task 1: Confirm that a Google Cloud Storage bucket exists that contains a file
gsutil mb gs://$DEVSHELL_PROJECT_ID
gsutil cp gs://sureskills-ql/challenge-labs/ch01-startup-script/install-web.sh gs://$DEVSHELL_PROJECT_ID
# Task 2: Confirm that a compute instance has been created that has a remote startup script called install-web.sh configured
gcloud compute instances create example-instance --zone=us-central1-a --tags=http-server --metadata startup-script-url=gs://$DEVSHELL_PROJECT_ID/install-web.sh
######################################################################################
## Set Up and Configure a Cloud Environment in Google Cloud: Challenge Lab # GSP321 ##
######################################################################################
====================== TASK 1: Create development VPC manually ======================
gcloud compute networks create griffin-dev-vpc --subnet-mode custom
gcloud compute networks subnets create griffin-dev-wp --network=griffin-dev-vpc --region us-east1 --range=192.168.16.0/20
######################################################################################
## Automating Infrastructure on Google Cloud with Terraform: Challenge Lab # GSP345 ##
######################################################################################
====================== Setup : Create the configuration files ======================
Make the empty files and directories in Cloud Shell or the Cloud Shell Editor.
------------------------------------------------------------------------------------
touch main.tf
touch variables.tf
@halilintar8
halilintar8 / queue.go
Created September 26, 2022 10:12 — forked from harrisonturton/queue.go
RabbitMQ client that automatically reconnects when the connection fails, and has a confirmed push method (i.e. the server is guaranteed to recieve the message)
package main
import (
"errors"
"github.com/streadway/amqp"
"log"
"os"
"time"
)
@halilintar8
halilintar8 / consumer.go
Created September 26, 2022 10:12 — forked from simpleton/consumer.go
Golang auto-reconnect rabbitmq consumer
package base
import (
"errors"
"fmt"
"github.com/manucorporat/try"
"github.com/simpleton/beego"
"github.com/streadway/amqp"
"math/rand"
"model/helper"
@halilintar8
halilintar8 / ssl-check.py
Created August 7, 2022 10:35 — forked from gdamjan/ssl-check.py
Python script to check on SSL certificates
# -*- encoding: utf-8 -*-
# requires a recent enough python with idna support in socket
# pyopenssl, cryptography and idna
from OpenSSL import SSL
from cryptography import x509
from cryptography.x509.oid import NameOID
import idna
from socket import socket