The following problems are equvalent of Grokking the coding interview course, and solutions are also attached
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# instal lampp | |
--apache | |
sudo apt update | |
sudo apt install apache2 | |
sudo ufw app list | |
sudo ufw allow in "Apache Full" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kotlin | |
source: https://www.youtube.com/watch?v=F9UC9DY-vIU | |
Variables | |
* 2 types | |
1. immutable -> val | |
2. mutable -> var |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |