Skip to content

Instantly share code, notes, and snippets.

@gwijayas
gwijayas / ubuntu-14.04-openssl-3.0.md
Last active July 25, 2025 08:22
kompilasi openssl 3.0 di Ubuntu 14.04

Kompilasi openssl 3.0 di Ubuntu 14.04 (Trusty)

Lokasi hasil kompilasi ada di folder berbeda, dikarenakan ada program-program yang belum kompatibel dengan openssl 3.0, misal PHP < 8.1 tidak bisa menggunakannya.

export CFLAGS="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security"
export CXXFLAGS="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security"
export CPPFLAGS="-Wdate-time -D_FORTIFY_SOURCE=2" 
export LDFLAGS="-Wl,-rpath=/opt/retrofit2025/openssl30/lib64 -Wl,--enable-new-dtags -Wl,-Bsymbolic-functions -Wl,-z,relro"
@gwijayas
gwijayas / systemd-n8n-postgresql.md
Last active July 13, 2025 07:18
systemd n8n dengan Postgresql

Kondisi:

  • Aplikasi n8n dijalankan oleh pengguna biasa, untukai, yang dipasang pada rumahnya, dan tidak memiliki hak sudo.
  • NodeJS dipasang pada /home/untukai/app/node2216/.
  • n8n dipasang menggunakan metode npm dan menggunakan database PostgreSQL
  • user1 adalah nama pengguna yang memiliki hak sudo
@gwijayas
gwijayas / systemd-python-conda.md
Created July 11, 2025 07:25
Contoh systemd untuk aplikasi python yang diatur oleh Conda

Contoh aplikasi conda dan unit systemd

Kondisi:

  • Ubuntu 24.04
  • Nama pengguna adalah untukai, tidak memiliki akses sudo
  • Menggunakan Miniconda, dipasang pada /home/untukai/app/miniconda3/
  • Open WebUI dipasang mengikuti petunjuk "Python->Conda", dan sudah dicoba dengan menjalankan open-webui serve --port 3030 (karena sudah ada aplikasi yang menggunakan port bawaan Open WebUI, port 3000)
# Build Python 3.6.x di Ubuntu 9test 14.04,16.04
# dengan --enable-optimizations, butuh test 2 jam-an :(
./configure --prefix=/opt/python36 --enable-shared \
--enable-loadable-sqlite-extensions \
--with-dbmliborder=bdb:gdbm \
--with-computed-gotos \
--without-ensurepip \
--with-system-expat \
--with-system-libmpdec \
--with-system-ffi \
<?php
function Redirect($url, $permanent = false) {
if (headers_sent() === false)
{
header('Location: ' . $url, true, ($permanent === true) ?
301 : 302);
}
exit();
<?php
/**
* This script can be used for generating PHP model for PDT.
* It builds PHP functions according to the loaded extensions in running PHP,
* using complementary information gathered from PHP.net documentation
*
* @author Michael Spector <[email protected]>
*/
if (version_compare(phpversion(), "5.0.0") < 0) {
<?php
/**
* This script can be used for generating PHP model for PDT.
* It builds PHP functions according to the loaded extensions in running PHP,
* using complementary information gathered from PHP.net documentation
*
* @author Michael Spector <[email protected]>
*/
if (version_compare(phpversion(), "5.0.0") < 0) {
@gwijayas
gwijayas / gist:2f2efa78ff665a6638b9
Created March 21, 2015 09:05
ubuntu install python 2.7.9 with pyenv
CONFIGURE_OPTS="--enable-unicode=ucs4 --with-dbmliborder=bdb:gdbm --with-system-expat --with-system-ffi --with-fpectl --enable-ipv6" pyenv install 2.7.9
perl Makefile.PL MP_TRACE=0 MP_USE_DSO=1 MP_USE_STATIC=0 MP_APR_CONFIG=/home/wijaya/opt/apache/bin/apr-1-config MP_APXS=/home/wijaya/opt/apache/bin/apxs
perl Makefile.PL --with-apache2-apxs=/home/wijaya/opt/apache/bin/apxs --prefix=/home/wijaya/opt/apache