Skip to content

Instantly share code, notes, and snippets.

View ajikamaludin's full-sized avatar
💭
Wants to dreams

Aji Kamaludin ajikamaludin

💭
Wants to dreams
View GitHub Profile

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@ajikamaludin
ajikamaludin / sendemail.go
Created July 25, 2023 07:47
send email with attachment in golang
package smtpserver
import (
"bytes"
"crypto/tls"
"encoding/base64"
"fmt"
"mime/multipart"
"net/smtp"
)
/*! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
/*
Document
========
*/
/**
Use a better box model (opinionated).
*/
#remainder to disable selinux
install mod_security 3:
yum groupinstall 'Development Tools' -y
yum install gcc-c++ flex bison yajl yajl-devel curl-devel curl GeoIP-devel doxygen zlib-devel pcre-devel
yum install lmdb lmdb-devel libxml2 libxml2-devel ssdeep ssdeep-devel lua lua-devel
yum install gd gd-devel libxslt-devel perl-ExtUtils-Embed gperftools wget zip unzip
git clone --depth 1 -b v3/master --single-branch https://github.com/SpiderLabs/ModSecurity
cd ModSecurity
git submodule init
#for LTE connection
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","internet"
Password = { }
Phone = *99#
Modem Type = Analog Modem
Stupid Mode = yes
Baud = 9600
1. Create file /usr/share/applications/whatsapp-webapp.desktop
<<<<
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=WhatsApp
GenericName=WhatsApp
Comment=WhatsApp desktop webapp
#Exec=webapp-container --store-session-cookies --webappUrlPatterns=https?://*.whatsapp.com/* --user-agent-string='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36 Edg/85.0.564.44' https://web.whatsapp.com %u
Exec=/opt/google/chrome/google-chrome --app=https://web.whatsapp.com/
Terminal=false
Install Postgresql-10 with bucardo sync on centos 7
#install util
yum install epel-release
yum update
yum install wget htop zip unzip
#install portgresq 10
yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum update
yum install postgresql10 postgresql10-server postgresql10-contrib postgresql10-plperl
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
#include <ESP8266HTTPClient.h>
MDNSResponder mdns;
ESP8266WebServer server(80);
HTTPClient http;
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
<html>
<head>
<title>MapServer Itasca Application</title>
<script language="javascript">
function configure() {
var template = document.demo.template.options[document.demo.template.selectedIndex].value;
var snippet = " TEMPLATE " + template;
document.demo.map_web.value = snippet;