Skip to content

Instantly share code, notes, and snippets.

View maqnouch's full-sized avatar

Mohammed maqnouch

View GitHub Profile
@maqnouch
maqnouch / postman-update.sh
Created October 3, 2020 00:58 — forked from lira/postman-update.sh
Install/Update postman or postman canary (beta) for linux. Tested in ubuntu 17.10 gnome3
#!/bin/bash
cd /tmp || exit
read -r -p "[s]table or [b]eta? [sS/bB] " choice
choice=${choice,,} # tolower
if [[ ! "$choice" =~ ^(s|b)$ ]]; then
exit
fi
if [[ "$choice" = "s" ]]; then
url=https://dl.pstmn.io/download/latest/linux64
name=Postman
Configuration: S3
=================
## Create an IAM user
https://console.aws.amazon.com/iam/home?region=us-east-1#/users$new?step=details
nom: tkalem_backend
spécifier le type d'accèss: Accès par programmation
Choisir l'option: "Attacher direct<ement les stratégies existantes" et donner a l'utiliser les autorisaton: AmazonS3FullAccess (picture)
save the access ID and the secret access key to be use in the backend configuration file
@maqnouch
maqnouch / README.md
Last active May 3, 2024 19:15
Signal Installation Steps
@maqnouch
maqnouch / credential.helper
Created February 14, 2018 10:28
skip password typing when using https:// on GitHub?
git config --global credential.helper
@maqnouch
maqnouch / compress-png.sh
Created September 12, 2017 15:54
Bash Shell Script To Bulk Optimize Images With TinyPNG API
#!/bin/bash
TINYAPIKEY="YOUR_API_KEY"
# Make sure source dir is supplied
if [ -z "$1" ]
then
echo "Missing argument. Supply the source directory containing the images to be optimized. Usage: ./tiny.sh <source_dir>"
exit 1
fi
@maqnouch
maqnouch / gist.txt
Created December 8, 2016 13:16
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master
@maqnouch
maqnouch / HmacSha1Signature.java
Created September 22, 2016 10:37
Java code for calculating HMAC-SHA1 Signatures
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
import java.util.Formatter;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
/**
import java.util.*;
import java.text.*;
public class DateFrance
{
public static void main(String[] argv)
{