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
#Tambahkan baris berikut pada fungsi update di issues_controller.rb | |
@issue.staging_release(params[:id],@issue.status_id) | |
# Tambahkan baris berikut sebagai fungsi publik di model issue.rb | |
# Release commit files issues to StagingServer | |
def staging_release(issue_id,status_id) | |
if status_id == 4 | |
for item in Issue.get_issues_code_path(issue_id) | |
rilis = `release.sh /var/www/MyApps#{item['path']}` | |
logger.debug “#{rilis}” |
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
<script type="text/javascript">// <![CDATA[ | |
var raw,good,count=0; | |
//Jalankan ketika DOM selesai dikonstruksi | |
$(document).ready(function() { | |
/* Looping setiap elemen image yang atribut src(nya) | |
* mengandung kata thumb | |
*/ | |
$('#loader').show(); |
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 | |
# --------------------------------------------------------- | |
# WikiCommonsDongdoders | |
# @author: gibrain.wordpress.com | |
# | |
# A simple script to mirror all image (full resolution) | |
# from Wikimedia Commons Search Results. | |
# | |
# Usage | |
# ./WikiCommonsDongdoders [short url] |
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
# Pindah ke direktori ~/.ssh | |
$ cd ~/.ssh | |
# Generate public & private key | |
$ ssh-keygen -f brain | |
# Kopi public key ke host yg ingin diremote | |
$ ssh-copy-id -i brain.pub brain@192.168.30.56 | |
Perintah diatas akan menyisipkan public key brain.pub |
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 | |
for old in *.mp3; do | |
new=$(echo $old | sed -e 's/[^a-zA-Z0-9\s\.]/_/g' | sed -e 's/_\+/_/g' | sed -e 's/_\./\./g') | |
mv -v "$old" "$new" | |
done | |
# Modified from: | |
# http://stackoverflow.com/questions/1961255/rename-files-using-a-regex-with-bash |
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 | |
# Mengunduh semua lema dari kamus kateglo | |
# Author: Brain90 | |
set -vx | |
url='http://www.kateglo.com/?&mod=dictionary&' | |
# Halaman maksimum untuk tiap entri | |
declare -A entri | |
entri[a]=66 entri[b]=160 entri[c]=31 entri[d]=47 entri[e]=24 entri[f]=11 |
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
Array ( [Indonesia] => Array ( [Bali] => Array ( [0] => Legian [1] => Tanah | |
Lot [2] => Seminyak ) [Jawa Barat] => Array ( [0] => Grand Canyon [1] => | |
Ranca Upas [2] => Curug Dago ) ) [Eropa] => Array ( [Spanyol] => Array ( | |
[0] => Granada [1] => Andalusia [2] => Navarra ) [Turki] => Array ( [0] => | |
Fethiye [1] => Nemrut [2] => Belek ) ) ) |
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
<? | |
$ObjekWisata = array( | |
"Indonesia" => array("Bali" => array("Legian","Tanah Lot","Seminyak"), | |
"Jawa Barat" => array("Grand Canyon","Ranca Upas","Curug Dago")), | |
"Eropa" => array("Spanyol" => array("Granada","Andalusia","Navarra"), | |
"Turki" => array("Fethiye","Nemrut","Belek") | |
)); | |
?> |
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
Array | |
( | |
[Indonesia] => Array | |
( | |
[Bali] => Array | |
( | |
[0] => Legian | |
[1] => Tanah Lot | |
[2] => Seminyak | |
) |
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
<? | |
function trimSpace($rowFromCSV) | |
{ | |
$cleanRow = array(); | |
array_walk($rowFromCSV, function ($val, $key) use (&$cleanRow) { | |
$cleanData[trim($key)] = trim($val); | |
}); | |
return $cleanRow; | |
} |
OlderNewer