Skip to content

Instantly share code, notes, and snippets.

azul azulkipli

Block or report user

Report or block azulkipli

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@azulkipli
azulkipli / gist:df4ccab7a343438a0dcab49f18a2c58f
Last active Feb 13, 2019
alias script to backup & rsync remote folder
View gist:df4ccab7a343438a0dcab49f18a2c58f
# alias backup
alias backup-appname='ssh -i ~/path_to/sshkey.pem user@ip_address "tar jcfv /fullpath_server_directory/filename-`date +%F.%H%M`.tar.bz2 /fullpath_server_directory/app_directory"'
# alias rsync
alias rsync-appname='rsync -a -e "ssh -i /local_fullpath_to/sshkey.pem -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -rz --progress --delete-after /local_fullpath_to/app_directory/ user@ip_address:/fullpath_server_directory/app_directory/'
View gist:285d157be09693b77fcfaaaf80201554
<?php
class Pipeline
{
public static function make_pipeline(...$funcs)
{
return function($arg) use ($funcs)
{
# calling each function in the make_pipeline in order
foreach($funcs as $function) {
# Store the triggering value in first function of args
View gist:471663109999506660996cbd354c44d5
<?php
class Palindrome
{
public static function isPalindrome($word)
{
$str = strtolower($word);
if ($str == strrev($str))
return TRUE;
else
View gist:6365d7d3acdd734c22fb18ec38a56a47
select name from employees where id not in (select managerId from employees m where managerId is not null)
-- ref: https://sqliteonline.com/#fiddle-5c2f897f7180djmyjqi96d0a
View JDS_SQL#1
SELECT COUNT(*) FROM students WHERE firstName='John';
View gist:a829781b2653fffb86c2ebb7cdc695d3
function appendChildren(decorateDiv) {
var allDivs = document.getElementsByTagName("div");
var numberOfDivs=allDivs.length;
for (var i = 0; i < numberOfDivs; i++) {
var newDiv = document.createElement("div");
decorateDiv(newDiv);
allDivs[i].appendChild(newDiv);
}
}
View gist:7199baf4a5a13168a51f7ae91605e5b1
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Company page</title>
</head>
<body>
<p>Welcome! Here you can find the following things:</p>
<ol>
<li><a href="#logo"><em>Company's logo</em></a></li>
View gist:bad8eb21e3e31961b862b6325a146805
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Avatar</title>
<style>
.avatar {
width: 150px;
height: 150px;
View gist:5498f320c14a277fa94e17a2bf5c6bd7
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Modal Dialog</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
</head>
View Bulk Push Notification Sample
UserID;NoHandphoneSeller;NamaOutlet;MessageTitle;MessageDeeplink;MessageBody
"4422";"085838520960";"085838520960";"Bonus menarik nih";"ypls://yapulsa/inbox";"Halo 085838520960 ada bonus menunggu mu di surga, cek https://bit.ly/2M9iNKo"
"6217";"085783666877";"085783666877";"Hola";"ypls://yapulsa/inbox";"Halo 085783666877 ada bonus menunggu mu di surga cekidot https://bit.ly/2M9iNKo"
"4826";"085838520960";"085838520960";"Besar manfaatnya";"ypls://yapulsa/inbox";"Halo 085838520960 ada bonus menunggu mu di surga cekidot https://bit.ly/2M9iNKo"
You can’t perform that action at this time.