Skip to content

Instantly share code, notes, and snippets.

View movahhedi's full-sized avatar
💻
Coding, probably.

Shahab Movahhedi movahhedi

💻
Coding, probably.
View GitHub Profile
@movahhedi
movahhedi / SmsIr.php
Last active June 7, 2023 13:11
SMS.IR Full PHP Class
<?php
/**
* @author Shahab Movahhedi <dev@shmovahhedi.com>
* @copyright © 2022 Shahab Movahhedi. All rights reserved.
* @link http://sms.ir/ Documentation of sms.ir RESTful API PHP sample.
* @version 1.2
*/
class SmsIr {
@daviesesiro
daviesesiro / image-resize.js
Last active June 27, 2024 01:05
a minimal function to resize an image on the browser in JavaScript
/**
* Resizes an Image File and converts it to a dataurl string.
* @param imageFile the image file (probably from a file input)
* @param resize_width The width you want the image to be
* @param quality quality of the resize image 0 - 1
*/
const resizeImage = ({
resizeWidth = 400,
imageFile,
quality = 1,
@aleclarson
aleclarson / rollup-typescript.md
Last active September 23, 2024 20:01
The best Rollup config for TypeScript libraries

Features

🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
.d.ts bundle + type-checking
🧐 Source maps

Install

@anuraghazra
anuraghazra / Exclude-node_modules.md
Last active January 9, 2024 20:00
Exclude node_modules folder when copying directory.

Handy Trick To Get Rid Of node_modules

This one is a simple and handy trick when you want to copy your directories without node_modules folder.

Enter this command in your terminal.

robocopy SOURCE DEST /mir /xd node_modules
@LoganGray
LoganGray / chromeinstall_ubu16.sh
Last active June 6, 2023 14:35
this worked to install selenium and google chrome on my Ubuntu 16 server.
#!/usr/bin/env bash
# used to install offical chrome and selenium on Ubuntu 16.04.1 LTS, 18.04, 20.04.1 LTS desktop, Jan 2021
# also tested and works on Elem OS 5.1 :)
#
# make sure script is run as root or sudo
if [[ $(whoami) != "root" ]] ; then
echo ; echo "This script, $0, SHOULD be run as ROOT. " ; echo
exit 1
fi
#
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active September 24, 2024 18:55
Conventional Commits Cheatsheet

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@Oranzh
Oranzh / AES-256 encryption and decryption in PHP and C#.md
Created March 24, 2018 04:19
AES-256 encryption and decryption in PHP and C#

AES-256 encryption and decryption in PHP and C#

Update: There is a more secure version available. Details

PHP

<?php

$plaintext = 'My secret message 1234';
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active September 24, 2024 13:52
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example