This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# here: Listen 80 | |
<VirtualHost localhost:80> | |
ServerName localhost | |
DocumentRoot "C:/webserver" | |
</VirtualHost> | |
<VirtualHost php52.local:80> | |
ServerName php52.local | |
DocumentRoot "C:/webserver" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM | |
( | |
SELECT * the_table | |
ORDER BY created_at_field DESC | |
) t | |
GROUP BY t.id_field | |
-- On MySQL with InnoDB engine this query was returning the expected result, but i have no idea with another database and engine. | |
-- Hopefully this trick would work, tell me if it's not. And maybe you can use more complex query as explined on stackoverflow or others. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
renaming thumb1_ to thumb_ with single line, tested on cygwin | |
$ for i in thumb1_*; do mv ${i} ${i/#thumb1_/thumb_}; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerName php52 | |
DocumentRoot /home/iyank4/www | |
ScriptAlias /cgi-bin/ /home/iyank4/www/cgi-bin/ | |
<FilesMatch ".+\.ph(p[345]?|t|tml)$"> | |
SetHandler None | |
</FilesMatch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
WAKTU=$(date +%Y%m%d_%H%I%S_%Z) | |
if [ -f alldump.sql ]; | |
then | |
rm alldump.sql | |
fi | |
if [ -f alldump.sql.tar.gz ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export WB_NO_GNOME_KEYRING=1 | |
mysql-workbench |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lakukan beberapa kali, hingga semuanya di replace. | |
Search | Replace | |
---------------------------------- | |
([a-z_]+);(\n[ ]*)echo => $1. | di search paling belakang kasih 1 spasi setelah echo | |
>(\n[ ]*)"; => >"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe id="myID" src="THE_URL" width="100%" height="20" frameborder="0"></iframe> | |
<script> | |
function setIframe() { | |
$("#dsct").animate({height: $("#dsct").contents().height()+"px"}, 500) | |
} | |
$("#myID").load(function() { | |
setIframe(); // got false height, so we need to execute again after 1 second | |
setTimeout(function(){ setIframe() },1000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Script to automate adding and removing privileges from several databases to specific MySQL user | |
# Author: Iyan Kushardiansah <iyank4@gmail.com> | |
# Date: 2014-01-13 | |
# | |
# MySQL user used for backup | |
MYSQL_USER="backup4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On Mac | |
Enable the minikube registry | |
$ minikube addons enable registry | |
find the registry IP | |
$ kubectl get services -n kube-system | |
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | |
kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP,9153/TCP 18h | |
kubernetes-dashboard ClusterIP 10.104.90.254 <none> 80/TCP 18h |