Skip to content

Instantly share code, notes, and snippets.

View AAlsafri's full-sized avatar
🎯
Focusing

Abdul Alsafri AAlsafri

🎯
Focusing
View GitHub Profile
@AAlsafri
AAlsafri / creating_exceptions.plantuml
Created January 21, 2024 03:59
Creating Exceptions
@startuml
class AtaBaseException {
#message: String
+AtaBaseException(message: String)
}
class AtaInvalidProfileParameterException {
+AtaInvalidProfileParameterException(message: String)
}
@AAlsafri
AAlsafri / zoned.js
Created January 18, 2024 16:31 — forked from defunkt/zoned.js
Timezones in JavaScript, from http://errtheblog.com/posts/49-a-zoned-defense
var Timezone = {
set : function() {
var date = new Date();
date.setTime(date.getTime() + (1000*24*60*60*1000));
var expires = "; expires=" + date.toGMTString();
document.cookie = "timezone=" + (-date.getTimezoneOffset() * 60) + expires + "; path=/";
}
}