- Gennerate SSH Key ssh-keygen -t rsa -b 4096 -C longlv.th@gmail.com ssh-keygen -t rsa -b 4096 -C le.van.long@sun-asterisk.com
- Remove ssh: rm -f ~/.ssh/id_rsa*
- View ssh: cat ~/.ssh/id_rsa.pub
- Check if exists: ls -al ~/.ssh -Adding your SSH key to the ssh-agent eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_rsa https://help.github.com/articles/connecting-to-github-with-ssh/
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
| [ | |
| { | |
| "tinh_thanh": "An Giang", | |
| "xa_phuong_list": [ | |
| { | |
| "xa_phuong": "An Biên", | |
| "old_xa_phuong": "Thị trấn Thứ Ba, Xã Đông Yên, Xã Hưng Yên" | |
| }, | |
| { | |
| "xa_phuong": "An Châu", |
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
| import javax.crypto.Cipher; | |
| import java.security.*; | |
| import java.security.spec.PKCS8EncodedKeySpec; | |
| import java.security.spec.X509EncodedKeySpec; | |
| import java.util.Base64; | |
| /** | |
| * @author Anass AIT BEN EL ARBI | |
| * <ul> | |
| * <li>AES/CBC/NoPadding (128)</li> |
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
| static void translucentStatusBar(Activity activity, boolean hideStatusBarBackground) { | |
| Window window = activity.getWindow(); | |
| window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); | |
| if (hideStatusBarBackground) {// Remove status bar | |
| window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); | |
| window.setStatusBarColor(Color.TRANSPARENT); | |
| window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); | |
| } else {// Transparent status bar | |
| window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | |
| <!-- Drop Shadow Stack --> | |
| <item> | |
| <shape> | |
| <padding | |
| android:bottom="1dp" | |
| android:left="1dp" | |
| android:right="1dp" |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
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
| ObjectMetadata metadata = new ObjectMetadata(); | |
| metadata.setContentType(mpf.getContentType()); | |
| String key = Util.getLoginUserName() + "/" | |
| + mpf.getOriginalFilename(); | |
| metadata.setContentLength(mpf.getSize()); | |
| PutObjectRequest putObjectRequest = new PutObjectRequest( | |
| Constants.S3_BUCKET_NAME, key, mpf.getInputStream(), | |
| metadata) | |
| .withStorageClass(StorageClass.ReducedRedundancy); |
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
| document.addEventListener("scroll", scrollHandler, true); | |
| function scrollHandler() { | |
| currentScrollPosition = document.documentElement.scrollTop; | |
| for (var i=1; i<=positionArray.length; i++){ | |
| if (currentScrollPosition>=positionArray[i-1] && currentScrollPosition < positionArray[i]) { |
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
| function generateId () { | |
| const charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-'; | |
| var chars = []; | |
| for (var i = 0; i < 7; i++) { | |
| chars[i] = charset[Math.floor(Math.random() * charset.length)] | |
| } | |
| return chars.join(''); | |
| } |
NewerOlder