Skip to content

Instantly share code, notes, and snippets.

View sintret's full-sized avatar

andy fitria sintret

View GitHub Profile
/* ----------------------------------
Css Profile Edit Dropdown
Author: iModDesign
Version: 1.0
------------------------------------ */
ul, li {
list-style:none;
padding:0;
margin:0;
@sintret
sintret / git_pull_force
Last active March 1, 2022 20:42
Git pull with overwrite local
DEBUG='app' pm2 start ecosystem.config.js --env production
##git merge##
git checkout master
git pull origin master
git merge test
git push origin master
##Git Reset##
git fetch --all
@sintret
sintret / libxl_setup.sh
Created June 25, 2018 04:17
Compile libxl library to linux centos with php 7.1
#!/bin/bash
#
# ilia/php_excel extension example install script for PHP7+ on CentOS 7+ as base interpreatator
#
# For installation php nginx and mysql see at https://www.hostinger.com/tutorials/how-to-install-lemp-centos7
#
# usage:
# > yum install epel-release -y
# > (optionally) sudo service php7.0-fpm restart)
#
@sintret
sintret / aws-phantom
Created May 4, 2018 04:23
install phantomjs in aws ec2
# download and unpack distribution
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
sudo mkdir /opt/phantomjs
bzip2 -d phantomjs-2.1.1-linux-x86_64.tar.bz2
sudo tar -xvf phantomjs-1.9.8-linux-x86_64.tar --directory /opt/phantomjs/ --strip-components 1
sudo ln -s /opt/phantomjs/bin/phantomjs /usr/bin/phantomjs
@sintret
sintret / form
Created April 23, 2018 07:15
form js via ajax
/**
* Created by [email protected] on 3/18/2018.
* For bengkel io and other purpose only
*/
function trashImage(myValue, elmJsonImages, filename) {
if (elmJsonImages) {
var arr = JSON.parse($("#" + elmJsonImages).val());
var index = arr.indexOf(filename);
arr.splice(index, 1);
$("#" + elmJsonImages).val(JSON.stringify(arr));
function submitForm(element, elmFiles, callback) {
callback = callback || function () {}
elmFiles = elmFiles || "";
var form = document.getElementById(element);
if (form) {
var url = form.action;
if (!url) {
url = window.location.pathname;