Skip to content

Instantly share code, notes, and snippets.

View ibnux's full-sized avatar
💭
korban PHP di Jawa

iBNu Maksum ibnux

💭
korban PHP di Jawa
View GitHub Profile
@nasirhafeez
nasirhafeez / freeradius-advanced-use-cases.md
Last active May 8, 2024 18:23
FreeRADIUS Advanced Use Cases
@jweede
jweede / pgbouncer.chart.py
Created February 26, 2019 16:18
Rough pgbouncer plugin for netdata
#!/usr/bin/env python
"""
Collects stats about pgbouncer client and postgres server connections
If psycopg2 is available it will use it instead of psql and will
query pgbouncer both for client and postgres server connections.
test out using:
/opt/netdata/usr/libexec/netdata/plugins.d/python.d.plugin 1 debug trace pgbouncer
@proteye
proteye / aes_encryption_helper.dart
Created September 5, 2018 10:54
How to AES-256 (CBC/CFB mode) encrypt and decrypt in Dart/Flutter with Pointy Castle
import 'dart:convert';
import 'dart:typed_data';
import "package:pointycastle/export.dart";
import "./convert_helper.dart";
// AES key size
const KEY_SIZE = 32; // 32 byte key for AES-256
const ITERATION_COUNT = 1000;
@kinlane
kinlane / long-running-curl-sse.php
Created February 15, 2018 17:38
Long Running PHP CURL Requests To Handle Server Sent Events (SSE)
<?php
// prepare headers for API call
$request_headers = array();
// prepare the url of the api I am calling
$api_url = "http://api.example.com?parameters=whatever";
// append streamdata sandbox proxy
$url = 'https://streamdata.motwin.net/' . $api_url;
@muhammad-naderi
muhammad-naderi / IonSetSelfSignedSSL.java
Last active June 22, 2020 03:41
this gist is gathered from here or there on the internet, and I made a few adjustment to support all of Ion getInstance/getDefault models. You just need to call #setSelfSignedSSL() before you make your Ion call to a self signed https endpoint. also put the .cer file in the assets folder
public void setSelfSignedSSL(Context mContext, @Nullable String instanceName){
try {
CertificateFactory cf = CertificateFactory.getInstance("X.509");
// cert file stored in \app\src\main\assets
InputStream caInput = new BufferedInputStream(mContext.getAssets().open("certificate.cer"));
Certificate ca = cf.generateCertificate(caInput);
caInput.close();
@fuzzykiller
fuzzykiller / viglink.md
Created January 17, 2017 09:59
Go from Viglink spam from DISQUS to actual link
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active July 23, 2024 12:13
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
<?php
$examples = [
// kendaraan umum
'B 1',
'B 1234 ABC',
'B-1234-ABC',
'AD-1234 - XYZ',
'AB1234LD',
'D1',
@sdorra
sdorra / keys.go
Created April 17, 2016 19:31
Golang RSA Key Generation
/*
* Genarate rsa keys.
*/
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
@stilliard
stilliard / jsonToTable.php
Created October 9, 2012 13:24
JSON to HTML table
<?php
/**
* JSON data to html table
*
* @param object $data
*
*/
function jsonToTable ($data)
{