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
// ==UserScript== | |
// @name Add CDC (ComfortDelgro Driving Centre) class bookings to google calendar | |
// @namespace ktaragorn | |
// @description Adds a link to export the class booking to google calendar so that you dont make mistakes in manual entry of date/time and miss the class | |
// @include https://www.cdc.com.sg/NewPortal/Booking/ReportPrView.aspx?ReceiptNo=* | |
// @version 2 | |
// @grant none | |
// ==/UserScript== | |
function make_date(time_array){ |
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
// ==UserScript== | |
// @name Copy Video Links from Youtube Watch Later | |
// @namespace ktaragorn | |
// @description Copy Video Links from Youtube Watch Later for later downloading | |
// @include https://www.youtube.com/playlist?list=WL | |
// @version 2 | |
// @grant none | |
// ==/UserScript== | |
function getUrls(){ |
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
// ==UserScript== | |
// @name Desktop Notifications for YourTurnMyTurn | |
// @namespace ktaragorn | |
// @include https://www.yourturnmyturn.com/status.php | |
// @description Desktop Notifications for YourTurnMyTurn.com overview page when it is your turn | |
// @version 6 | |
// @grant none | |
// ==/UserScript== | |
function refresh() |
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
JSON.stringify(Array.prototype.slice.call(document.querySelectorAll(".pl-video-title-link")).map(function(a){return a.href.replace(/&list=.*/g,'').replace(/&index=.*/g,'')})) |
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
#!/usr/bin/env ruby | |
unless ARGV.first | |
fail("Provide the name of the release branch. For e.g for release/5.0 provide 5.0 as the branch name") | |
end | |
base = ARGV[1] || "master" | |
puts "Ensure that this is run in the repository you want the data from!" | |
`git fetch` | |
pr_regexp = "Merge pull request" |
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
if [ "$1" == "clean" ] | |
then | |
operation="Clean" | |
elif [ "$1" == "scan" ] | |
then |
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
var data = $("tbody tr").map(function(){ | |
var $row = $(this) | |
var category = $row.find(".record-category").text() | |
var date = $row.find("td:last-child .ng-binding").text().split(" ").join("").split("\n").join("") | |
var amount = $row.find(".nonreferential-amount span:last-child").text() | |
var currency = $row.find(".nonreferential-amount .currency-code").text() | |
var amount_sgd = $row.find(".negative-amount .record-amount").text() | |
var payment_type = $row.find("img.payment-icon").attr("title") | |
var description = $row.find(".record-note").text() | |
return [[category, description, amount, currency, amount_sgd, payment_type, date]] |
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
Host shortname1? | |
Hostname %h.prod.xyz.com | |
Host test-myname | |
Hostname combo.test-myname.xyz.com | |
Host *.xyz.com | |
Hostname %h | |
Match Host *.xyz.com |
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
def get_columns list, options = {} | |
all = list.map{|item| item.columns}.flatten.uniq | |
symize = ->(key){key.try(:to_sym) || key} | |
if options[:only] | |
Array(options[:only]).map(&symize) & all | |
elsif options[:keys_search] | |
all.select{|k| k.to_s.downcase.match(options[:keys_search].to_s.downcase)} | |
else | |
all - Array(options[:not]).map(&symize) |
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
class ProgressBar | |
def initialize max | |
@max = max | |
@current = 0.0 | |
end | |
def draw | |
progress = @current/@max | |
wipe = "\r" | |
bar_length = 20 |
NewerOlder