Skip to content

Instantly share code, notes, and snippets.

View motaher13's full-sized avatar

motaher hossain motaher13

View GitHub Profile
1. resource: https://gist.github.com/Jonalogy/54091c98946cfe4f8cdab2bea79430f9
2. register your ssh key to all git accounts
3. Edit ~./ssh/config file
#personal
Host github.com
Hostname ssh.github.com
Port 443
#git shipday
private boolean isValidWebhook(String secret, String body, String timestamp, String headerSignature) {
String computedSignature = getSignature(secret, body, timestamp);
return headerSignature.equals(computedSignature);
}
String getSignature(String secret, String body, String timestamp) {
SecretKeySpec signingKey = new SecretKeySpec(secret.getBytes(), HMAC);
try {
String signature = body + timestamp;
AWS keywords
EC2: elastic compute cloud
EBS: elastic block store, just some storage
VPC: virtual private cloud, private network among instances
SPOT: unrented EC2 instances available for ren in cheap with bidding, will be occupied till the bid is better than market demand
Kotlin
source: https://www.youtube.com/watch?v=F9UC9DY-vIU
Variables
* 2 types
1. immutable -> val
2. mutable -> var
db=db.getSiblingDB("school");
db.person.drop();
var characters = ['a','b','c','d','e','f','g','h','i'];
var charactersLength = 9;
function getRandomInt(n) {
return Math.floor(Math.random() * n);
CREATE TABLE vbSMSContactTest (
cntContactNo varchar(50) NOT NULL,
cntSMSCountryID decimal(18,0) NOT NULL,
cntCountryCode varchar(10) NOT NULL,
cntOperatorCode varchar(10) NOT NULL,
cntSource varchar(100) DEFAULT NULL,
cntStatus tinyint(4) DEFAULT NULL,
cntCreationDate bigint(20) NOT NULL
);
The Linux Experiment
85.8K subscribers
https://www.youtube.com/watch?v=ArBCfhVsTZw
I recently set up my new Matebook 13 with some nice touchpad gestures on elementary OS, and it works great. Since I like to share, here is how to enable said gestures, and create them on the fly on your own system. These commands will work on Ubuntu, or anything based on Ubuntu, but you can adapt them for your own distro if needed.
Support the channel on Patreon: https://www.patreon.com/thelinuxexper...
Follow me on Twitter : http://twitter.com/thelinuxEXP
@motaher13
motaher13 / Lamp_ubuntu.txtt
Last active July 31, 2021 12:34
Ubuntu Lamp Stack setup
# instal lampp
--apache
sudo apt update
sudo apt install apache2
sudo ufw app list
sudo ufw allow in "Apache Full"
@motaher13
motaher13 / git.migrate
Created December 26, 2018 06:29 — forked from CESARDELATORRE/git.migrate
Move your existing git repository # to a new remote repository
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
### OPTION 1 ###########################################################################################
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#