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
// url : http://id.wikipedia.org/wiki/Daftar_provinsi_Indonesia | |
arr = new Array(); | |
// random id from 0 - 5 | |
random_country_id = Math.floor(Math.random() * (5 - 1 + 1) + 1); | |
$('.wikitable.sortable.jquery-tablesorter tr').each(function(i, tr){ | |
td = $(tr).children()[2] | |
name = $(td).text(); | |
if(i < 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
keyword = "(Part" | |
files = Dir.entries('.').select{|x| x.include?(keyword)} | |
files.each do |file| | |
wor = file.match(/( \()(.+)(?=.mp4)/)[0] | |
num = wor.match(/([0-9]+)/)[0] | |
num = (num.to_i < 10)? "#{0}#{num}" : num | |
new_name = "#{num}. #{file.gsub(wor, '')}" | |
File.rename(file, "#{Dir.pwd}/#{new_name}") | |
end |
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
require 'rubygems' | |
require 'nokogiri' | |
youtube_xml = ARGV[0] | |
xml = File.open(ARGV[0]) | |
srt = File.open(ARGV[1] || youtube_xml.gsub('.xml', '.srt'), 'w+') | |
doc = Nokogiri::XML(xml) | |
doc.children.children.each_with_index do |text, idx| |
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
for i in `seq 1 114`; do | |
if [ $i -lt 10 ]; then | |
file="00$i" | |
elif [ $i -lt 100 ]; then | |
file="0$i" | |
else | |
file=$i | |
fi | |
wget "http://download.quranicaudio.com/quran/mishaari_raashid_al_3afaasee/$file.mp3" |
NewerOlder