Skip to content

Instantly share code, notes, and snippets.

View wisammechano's full-sized avatar

Wisam Naji wisammechano

  • Iraq, Erbil
View GitHub Profile
@wisammechano
wisammechano / introrx.md
Created December 4, 2022 22:55 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@wisammechano
wisammechano / recompile-and-run.sh
Created November 22, 2022 00:58 — forked from PuKoren/recompile-and-run.sh
Recompile APK + Sign with apktool
# You must first install apktool (https://github.com/iBotPeaches/Apktool) and android SDK
# and decompile apk using it
# apktool d -rf my-app.apk
# then generate a key for sign in:
# keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
rm signed-app.apk
apktool b -f -d com.myapp
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore com.myapp/dist/com.myapp.apk alias_name
zipalign -v 4 com.myapp/dist/com.myapp.apk signed-app.apk
@wisammechano
wisammechano / example.yml
Created October 31, 2021 23:59 — forked from cecilemuller/example.yml
Run Docker Compose + in Github Action
name: Test
on:
push:
branches:
- main
- features/**
- dependabot/**
pull_request:
branches:
@wisammechano
wisammechano / block_hash.py
Created June 29, 2021 18:11 — forked from ironpark/block_hash.py
bitcoin block hash (python)
import requests
import hashlib
import struct
def load_block_data(block_hash):
r = requests.get('https://blockchain.info/ko/rawblock/' + block_hash)
return r.json()
location ~* ^/s3/(.*) {
set $bucket '<REPLACE WITH YOUR S3 BUCKET NAME>';
set $aws_access '<REPLACE WITH YOUR AWS ACCESS KEY>';
set $aws_secret '<REPLACE WITH YOUR AWS SECRET KEY>';
set $url_full "$1";
set_by_lua $now "return ngx.cookie_time(ngx.time())";
set $string_to_sign "$request_method\n\n\n\nx-amz-date:${now}\n/$bucket/$url_full";
set_hmac_sha1 $aws_signature $aws_secret $string_to_sign;
set_encode_base64 $aws_signature $aws_signature;
@wisammechano
wisammechano / README.md
Created March 10, 2019 23:34 — forked from benjaminbarbe/README.md
Nginx proxy to S3 with caching
@wisammechano
wisammechano / curl.md
Created March 9, 2019 02:16 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@wisammechano
wisammechano / install-comodo-ssl-cert-for-nginx.rst
Created July 7, 2018 03:41 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@wisammechano
wisammechano / Instructions.sh
Last active July 2, 2018 01:11 — forked from GhazanfarMir/Instructions.sh
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# FULL INSTRUCTIONS https://devmarketer.io/learn/deploy-laravel-5-app-lemp-stack-ubuntu-nginx/
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa