This file contains hidden or 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
# Add this line in /etc/apt/sources.list | |
# deb http://httpredir.debian.org/debian/ jessie main contrib non-free | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7638D0442B90D010 | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CBF8D6FD518E17E1 | |
sudo apt-get update --allow-unauthenticated | |
sudo apt-get install firmware-atheros | |
sudo dpkg -i --force-overwrite /var/cache/apt/archives/firmware-atheros_0.43_all.deb # if error says error processing archive /var/cache/apt/archives/firmware-atheros_0.43_all.deb | |
sudo apt -f install # to fix broken packages |
This file contains hidden or 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
Turn off windows cache for the specific drive from windows 10: https://www.maketecheasier.com/disable-disk-write-caching-windows10/ | |
On Ubuntu (make sure sda1 is unmounted): sudo mount -t ntfs-3g /dev/sda1 /mnt/ntfs/ | |
The above command can give following error: | |
Metadata kept in Windows cache, refused to mount. | |
Falling back to read-only mount because the NTFS partition is in an | |
unsafe state. Please resume and shutdown Windows fully (no hibernation | |
or fast restarting.) | |
For resolving the above error: | |
sudo ntfsfix /dev/sda1 | |
This file contains hidden or 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
sudo ln -s /usr/bin/python3 /usr/bin/python |
This file contains hidden or 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
ssh-keygen -t rsa -b 4096 -C "[email protected]" | |
eval $(ssh-agent -s) | |
ssh-add ~/.ssh/id_rsa | |
gedit ~/.ssh/id_rsa.pub |
This file contains hidden or 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
ffmpeg -i Star.Wars.The.Clone.Wars.S07E08.720p.WEB.H264-GHOSTS\[eztv\].mkv -c:a libmp3lame -q:a 4 star.mp3 | |
ffmpeg -i Star.Wars.The.Clone.Wars.S07E08.720p.WEB.H264-GHOSTS\[eztv\].mkv -i star.mp3 -c:v copy -map 0:v:0 -map 1:a:0 StarWars.mkv |
This file contains hidden or 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. Download diffmerge from here: https://drive.google.com/file/d/1K4myLVDTTLngX7hYR2kE8bmMH-XBAa53/view?usp=sharing | |
2. sudo add-apt-repository ppa:linuxuprising/libpng12 | |
3. sudo apt update | |
4. sudo apt install libpng12-0 | |
5. Goto Downloads | |
6. sudo dpkg -i diffmerge_3.3.2.1139-1_amd64.deb |
This file contains hidden or 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
# Install from : https://www.perforce.com/downloads/visual-merge-tool | |
cd ~/Downloads | |
# Move p4v-2019.2.1904275 from inside some parent folder to ~/Downloads/ | |
tar zxvf p4v*.tgz | |
sudo mkdir /opt/p4v | |
cd p4v-* | |
sudo mv * /opt/p4v | |
sudo ln -s /opt/p4v/bin/p4merge /usr/local/bin/p4merge | |
This file contains hidden or 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
# based on http://blogs.pdmlab.com/alexander.zeitler/articles/installing-and-configuring-p4merge-for-git-on-ubuntu/ | |
$ cd ~/Downloads | |
$ wget https://cdist2.perforce.com/perforce/r18.2/bin.linux26x86_64/p4v.tgz | |
$ tar zxvf p4v.tgz | |
$ sudo mkdir /opt/p4v |
This file contains hidden or 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 void printKeyHash() { | |
try { | |
PackageInfo info = getPackageManager().getPackageInfo(getApplicationContext().getPackageName(), | |
PackageManager.GET_SIGNATURES); | |
for(Signature signature: info.signatures){ | |
MessageDigest md = MessageDigest.getInstance("SHA"); | |
md.update(signature.toByteArray()); | |
Log.d("KeyHash", Base64.encodeToString(md.digest(), Base64.DEFAULT)); | |
} |
This file contains hidden or 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
map<char, int> :: iterator iter = charFrequency.find(a); | |
if(iter == charFrequency.end() ){ // not found | |
charFrequency.insert({a, 1}); | |
}else{ // found | |
iter->second = iter->second + 1; | |
} |