Skip to content

Instantly share code, notes, and snippets.

View ApOgEE's full-sized avatar
💭
code n learn

M. Fauzilkamil Zainuddin ApOgEE

💭
code n learn
View GitHub Profile
@ApOgEE
ApOgEE / notapogee-sequence.md
Created December 29, 2023 09:53
Cara Create Dan guna id_sequence dalam mysql atau mariadb

Guna ID Sequence dalam mysql atau mariadb

OK, selain dari Autoincrement, kita juga boleh guna sequential ID.

Cara nak create seq_contoh_saya yang bermula dengan nilai 13000 dan increment dia bertambah 1:

CREATE SEQUENCE IF NOT EXISTS seq_contoh_saya START WITH 13000 INCREMENT BY 1;

Lepas kita create sequence ni, kita boleh dapatkan nilai sequence dengan panggil:

@ApOgEE
ApOgEE / pmm2-client.playbook.yml
Created December 26, 2023 10:19
Install PMM Client on Ubuntu 22.04 Servers using Ansible
# apogeek ansible playbook
# - to install pmm2-client on ubuntu 22.04 servers
---
- name: Setup PMM Clients
hosts: all
become: yes
gather_facts: True
tasks:
- name: Install gnupg2
@ApOgEE
ApOgEE / podman-survival.md
Created December 9, 2023 02:17
Buat Service Supaya Podman Survive Reboot

Podman Survive Reboot

Docker adalah service dalam server manakala podman pula bukan service. Perbezaan antara Docker dan Podman dalam situasi ini ialah apabila kita reboot server.

Bila kita guna Docker, semua container yang run sebelum reboot akan run balik bila kita reboot server dan service docker kembali running. Tapi ini tak berlaku bila kita guna podman sebab podman bukanlah service.

Oleh itu, kita kena jadikan podman sebagai service.

@ApOgEE
ApOgEE / chatgpt-stable-diffusion-generate-prompt
Created June 28, 2023 03:07 — forked from anonymousmaharaj/chatgpt-stable-diffusion-generate-prompt
Prompt for ChatGPT to generate correct prompts to SD. You can leave comment to improve it.
I want you to help me make requests (prompts) for the Stable Diffusion neural network.
Stable diffusion is a text-based image generation model that can create diverse and high-quality images based on your requests. In order to get the best results from Stable diffusion, you need to follow some guidelines when composing prompts.
Here are some tips for writing prompts for Stable diffusion1:
1) Be as specific as possible in your requests. Stable diffusion handles concrete prompts better than abstract or ambiguous ones. For example, instead of “portrait of a woman” it is better to write “portrait of a woman with brown eyes and red hair in Renaissance style”.
2) Specify specific art styles or materials. If you want to get an image in a certain style or with a certain texture, then specify this in your request. For example, instead of “landscape” it is better to write “watercolor landscape with mountains and lake".
3) Specify specific artists for reference. If you want to get an image similar to the work of some
@ApOgEE
ApOgEE / gist:5e1725f1bac4dc00c723681a2d8034ca
Created September 11, 2022 19:33 — forked from nadeemsyed/gist:c89d67fe5805788b7243
Create a sample shared library in golang 1.5.
nadeem@myznc:~/go/src$ ls -al dummy
total 12
drwxrwxr-x 2 nadeem nadeem 4096 Jul 20 18:46 .
drwxrwxr-x 6 nadeem nadeem 4096 Jul 20 18:45 ..
-rw-rw-r-- 1 nadeem nadeem 129 Jul 20 18:46 hello.go
nadeem@myznc:~/go/src/dummy$ cat hello.go
// Package dummy contains hello world library.
package dummy
select (mytext ~ '^([0-9]+[.]?[0-9]*|[.][0-9]+)$');
@ApOgEE
ApOgEE / README.md
Last active September 29, 2021 19:24
Centos 8, RockyLinux 8 - Install Elasticsearch 7.x From Repo

Centos8 - Install Elasticsearch 7.x From Repo

  1. Download and add this file to /etc/yum.repos.d

    curl -o /etc/yum.repos.d/elasticsearch.repo \
    https://gist.githubusercontent.com/ApOgEE/62a09a4cbe31e7a75abb67aced271daa/raw/bbb0331ea7afad125c199c76c674dbbf942343f6/elasticsearch.repo
    

or

@ApOgEE
ApOgEE / twint_test.py
Created January 22, 2021 15:23
Twint DB testing Script
import twint
import os
'''
twint_test.py - Twint DB testing Script
'''
def test_db(c, run):
print("[+] Beginning DB test in {}".format(str(run)))
c.Database = "test_twint.db"

Keybase proof

I hereby claim:

  • I am apogee on github.
  • I am apogeek (https://keybase.io/apogeek) on keybase.
  • I have a public key ASAm-oTIIBujA0DhsJF30DMhraW7QuiUQNpQz91fAtAIMAo

To claim this, I am signing this object:

@ApOgEE
ApOgEE / nginx.repo
Created September 17, 2020 07:25
rhel/centos nginx repo
[nginx]
name=nginx repo
baseurl=https://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1