Skip to content

Instantly share code, notes, and snippets.

View mavaddat's full-sized avatar
🏠
Working from home

Mavaddat Javid mavaddat

🏠
Working from home
View GitHub Profile
@mavaddat
mavaddat / PSObjectComparer.cs
Last active November 28, 2021 01:39 — forked from josheinstein/PSObjectComparer.cs
IComparer for PSObjects in PowerShell
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.Contracts;
using System.Globalization;
using System.Linq;
using System.Management.Automation;
using System.Threading;
@mavaddat
mavaddat / svg_to_png.js
Last active October 26, 2021 03:34 — forked from rafaelsq/svg_to_png.js
SVG to Base64 PNG
function svgToPng(svg, callback) {
var svgContent = null;
//check if svg is a path string
if (typeof svg === 'string') {
//get svg element
var client = new XMLHttpRequest();
client.open('GET', svg);
client.onreadystatechange = function() {
svgContent = client.responseText;
####### License: MIT
"""MIT License
Copyright (c) 2020 Mavaddat Javid and Aaron Hall
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@mavaddat
mavaddat / .gitignore
Created July 12, 2019 19:28 — forked from VonC/.gitignore
Simple download and installation script, which can be called from the cloud
/senv.sublime-*
/WindowTabsSettings.txt
@mavaddat
mavaddat / download-latest-release.ps1
Last active June 26, 2019 17:08 — forked from MarkTiedemann/download-latest-release.ps1
Download latest dotnet/codeformatter from GitHub release via Powershell
# Download latest dotnet/codeformatter release from github
$repo = "dotnet/codeformatter"
$file = "CodeFormatter.zip"
$releases = "https://api.github.com/repos/$repo/releases"
Write-Host Determining latest release
$tag = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].tag_name
@mavaddat
mavaddat / Backup_cpanel.sh
Created September 29, 2017 06:05 — forked from osrecio/Backup_cpanel.sh
Get Backup Cpanel ( Files & DB's )
#!/bin/bash
LOG="/path_to_save_logs"
echo "Start backup web `date`" >> $LOG
cd /folder_to_save
FECHAF=`date +%Y.%m.%d`
mkdir $FECHAF
cd $FECHAF
FECHA=`date +%-m-%-d-%Y`