Skip to content

Instantly share code, notes, and snippets.

View sintret's full-sized avatar

andy fitria sintret

View GitHub Profile
@sintret
sintret / mysql_duplicate.txt
Last active March 23, 2019 09:32
mysql find duplicate
SELECT a.phone, b.phone, a.companyId , b.companyId , a.id,b.id
FROM member a, member b
WHERE a.phone = b.phone
AND a.companyId = b.companyId
AND a.id <> b.id
SELECT phone, COUNT(*) c FROM member GROUP BY phone HAVING c > 1;
SELECT GROUP_CONCAT(companyId), phone, COUNT(*) c FROM member GROUP BY phone HAVING c > 1;
@sintret
sintret / nginx
Last active July 3, 2020 14:14
nginx
Multiple PHP
http://hanangpriambodo.com/2019/04/05/install-multiple-php-di-centos-7/
https://www.cyberciti.biz/faq/howto-install-setup-nginx-on-debian-linux-9/
https://www.howtoforge.com/tutorial/how-to-install-nginx-with-php-and-mysql-lemp-on-debian-9/
@sintret
sintret / netdata
Created July 15, 2019 06:23
netdata
https://www.vultr.com/docs/installing-netdata-on-debian-9
sudo apt-get install zlib1g-dev uuid-dev libmnl-dev gcc make git autoconf autoconf-archive autogen automake pkg-config curl
cd ~
git clone https://github.com/firehol/netdata.git --depth=1
cd netdata
./netdata-installer.sh
@sintret
sintret / pipelines
Last active June 4, 2023 13:09
pipelines for bitbucket
CONNECT TO PIPELINE BITBUCKET
-------------------
Go to settings then click SSH Keys then generate
Copy your ssh-rsa then
input your domain and fetch
LINUX COMMAND
@sintret
sintret / my.ini
Last active August 1, 2023 03:39
# Example MariaDB config file for large systems.
#
# This is for a large system with memory = 512M where the system runs mainly
# MariaDB.
#
# MariaDB programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, do:
# 'my_print_defaults --help' and see what is printed under
https://www.faqforge.com/linux/how-to-renew-the-ispconfig-3-ssl-certificate/
cd /tmp
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xvfz ISPConfig-3-stable.tar.gz
cd ispconfig3_install/install
php -q update.php
//START//
This is for ispconfig for debian 9
nano /etc/my.cnf
add skip-grant-table
[mysqld]
skip-grant-tables
port=3306
datadir=/var/lib/mysql
@sintret
sintret / postgresql
Last active January 14, 2023 17:43
CREATE TABLE zgrid (
id SERIAL PRIMARY KEY,
"user_id" integer,
routename VARCHAR(100),
visibles text,
invisibles text,
labels text,
filter text,
"updated_at" timestamp,
"modified_by" integer,
npm_config_user=root npm install -g ...
var http = require('http');
const puppeteer = require("puppeteer");
var url = require('url');
const PORT = 3000;
let browser;
let pages = {} //store object if you want to store each page url
console.log(`Running at Port : ${PORT}`)