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)
@gwijayas
gwijayas / git2.php
Created December 9, 2012 04:15
php-git class and function list
<?php
// Start of git2 v.0.2.1
class Git2_Repository {
/**
* @param repository_path
*/
public function __construct ($repository_path) {}
# 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();
@gwijayas
gwijayas / gist:8631041
Created January 26, 2014 10:42
check ip lan
for ip in $(seq 1 254); do ping -c 1 192.168.0.$ip>/dev/null; [ $? -eq 0 ] && echo "192.168.0.$ip UP" || : ; done
@gwijayas
gwijayas / gist:8333907
Last active January 2, 2016 16:59
vim YouCompleteMe clang support with system version of clang
cmake -G "Unix Makefiles" -DUSE_SYSTEM_LIBCLANG=ON . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp
make ycm_support_libs
@gwijayas
gwijayas / gist:7355665
Created November 7, 2013 14:41
compile youcompleteme
cmake -G "Unix Makefiles" -DPATH_TO_LLVM_ROOT=/opt/llvm33 . ~/.vim/bundle/YouCompleteMe/cpp
@gwijayas
gwijayas / gist:7355646
Created November 7, 2013 14:40
compile vim
./configure --prefix=/opt/vim --enable-fail-if-missing --enable-cscope --enable-gpm --with-features=huge --enable-multibyte --enable-acl --with-x --enable-xim --enable-gui=gtk2 --disable-gnome-check --enable-gtk2-check --disable-motif-check --disable-athena-check --disable-fontset --enable-pythoninterp --enable-luainterp --enable-perlinterp --disable-mzschemeinterp --disable-python3interp --enable-rubyinterp