Skip to content

Instantly share code, notes, and snippets.

View shareefhiasat's full-sized avatar
😃
Exploring

Shareef hiasat shareefhiasat

😃
Exploring
View GitHub Profile
@shareefhiasat
shareefhiasat / LibPhoneNumberUnitTest.java
Created January 8, 2024 13:00
test cases for google library for validation https://www.npmjs.com/package/google-libphonenumber there is java version too
package com.sajilni.util;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import com.google.i18n.phonenumbers.NumberParseException;
import com.google.i18n.phonenumbers.PhoneNumberUtil;
import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber.CountryCodeSource;
@shareefhiasat
shareefhiasat / docker-compose.yml
Last active December 26, 2023 05:40
docker configuration with default minimum nginx configuration with port 80
version: "1.0"
services:
nginx:
image: nginx:latest
restart: unless-stopped
volumes:
- .\config\nginx.conf:/etc/nginx/nginx.conf
- .\logs:/var/log/nginx
- .\html:/var/www/html
ports:
@shareefhiasat
shareefhiasat / import-rds-certs.sh
Last active March 6, 2023 19:21 — forked from steini/import-rds-certs.sh
import RDS certificates to java keystore on alpine / osx
#!/usr/bin/env sh
#i tried it and working like charm just have to note make the file .sh chmod +x and you may need sudo to run with permission but be carefull with sudo
#be sure the $JAVA_HOME is configure correctly or make it static as commentedline 7 below
OLDDIR="$PWD"
if [ -z "$CACERTS_FILE" ]; then
# you should have java home configure to point for example /usr/lib/jvm/default-java/jre/lib/security/cacerts
CACERTS_FILE=$JAVA_HOME/jre/lib/security/cacerts
fi
@shareefhiasat
shareefhiasat / sample of what is going on
Created April 12, 2019 15:24
Connection String Encryption
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;
@shareefhiasat
shareefhiasat / paybutton
Created April 9, 2019 13:01
console log
Got the catalog! [{"catalogId":1,"name":"PCSB Online Catalog","status":"ACTIVE","segment":"CONSUMER","description":"The Progresif online Catalog for consumers","validFromDate":null,"category":"MASTER","operator":"PCSB"}]
paybutton.js:formatted:168 Got the product! [{"productId":101,"productLegacyId":"PCSB-ETICKET","catalog":{"catalogId":1,"name":"PCSB Online Catalog","status":"ACTIVE","segment":"CONSUMER","description":"The Progresif online Catalog for consumers","validFromDate":null,"category":"MASTER","operator":"PCSB"},"subCatalog":{"catalogId":3,"name":"A360-CATALOG","status":"ACTIVE","description":"A360 (ARIS) catalog","validFromDate":null,"category":"OSS-BSS","operator":"PCSB"},"productName":"eTicket","upfrontCost":0,"upfrontVat":0,"recurringVat":0,"costUnit":"cents","currency":"BND","recurring":false,"description":"eTicket technical offer","rank":6,"billingMode":"PREPAID","category":"TechnicalOffer","subCategory":"ETicket","localizedCategory":"Technical Offer","saleExpiryDate":null,"navigable":true,"ta
// Generated by CoffeeScript 1.10.0
(function() {
var $, Range, Trie,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
Trie = (function() {
function Trie() {
this.trie = {};
}
@shareefhiasat
shareefhiasat / Algorithims_Interview_Review.java
Last active August 11, 2018 18:52
Algorithims Interview Review
//2-kim
public void bubbleIterative(int arr[], int start, int end){
int n = arr.length;
int k;
for(int m = n; m >= 0; m--){
for(int i = 0; i < n-1; i++){
k = i + 1;
if(arr[k] > arr[i]){
swap(arr,k,i);
@shareefhiasat
shareefhiasat / git_newrepo
Created August 3, 2018 14:04 — forked from c0ldlimit/git_newrepo
Git: Push a new or existing repo to Github
# Create a new repository on the command line
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/c0ldlimit/vimcolors.git
git push -u origin master
# Push an existing repository from the command line
@shareefhiasat
shareefhiasat / ticket fetching
Created January 2, 2018 09:14
try this gist its cmd curl
curl "https://www.sajilni.com/cart-new/buy-tickets/5106/5757" -H "Cookie: _ga=GA1.2.1189611452.1511121150; sajilni_sendTicket=true; sajilni_sendEmailConfirmation=true; __utmz=164148285.1513687291.162.2.utmcsr=localhost:8081^|utmccn=(referral)^|utmcmd=referral^|utmcct=/cart-new/checkout/4399; countryCode=US; __utma=164148285.1189611452.1511121150.1514825209.1514880574.187; __utmc=164148285; JSESSIONID=CE52DE885E185E3E199E3B24AD45BD95; loginToken=3b8a9be496cf; AWSELB=75BB91F50A87D525582B9C772647912828620F06ED31BE5C746F0E113B3D337606B50160F5A554CF4F3404A4CAE176DB5147456F7406B79F05B428D321556BF1695B535D334976B6C09C23953065F2E7AA2C9BC047; buyTimer=60; buyTimerCreatedOn=Tue Jan 02 2018 11:13:15 GMT+0200 (Jordan Standard Time)" -H "Origin: https://www.sajilni.com" -H "Accept-Encoding: gzip, deflate, br" -H "Accept-Language: en-US,en;q=0.9" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36" -H "Content-Type: application/json" -H "Accept:
mail template
IMPORTANT:
We will have to maintain, backward compatability
knowing that we may need to ammend
old ones , or re create them
Expected From editor:
That it shall, have like these operation here