most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeatNote: I'm currently taking a break from this course to focus on my studies so I can finally graduate
| /* | |
| Copyright 2013 Google Inc. All Rights Reserved. | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software | 
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
#Intro
Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3
Kotlin project website is at kotlin.jetbrains.org.
All the codes here can be copied and run on Kotlin online editor.
Let's get started.
| import android.content.Context; | |
| import android.content.res.TypedArray; | |
| import android.graphics.Canvas; | |
| import android.graphics.Rect; | |
| import android.graphics.drawable.Drawable; | |
| import android.graphics.drawable.NinePatchDrawable; | |
| import android.util.AttributeSet; | |
| import android.widget.RelativeLayout; | |
| public class FRelativeLayout extends RelativeLayout { | 
| private static final int NOTIFICATION_ID = 1; | |
| private void showForegroundNotification(String contentText) { | |
| // Create intent that will bring our app to the front, as if it was tapped in the app | |
| // launcher | |
| Intent showTaskIntent = new Intent(getApplicationContext(), MyMainActivity.class); | |
| showTaskIntent.setAction(Intent.ACTION_MAIN); | |
| showTaskIntent.addCategory(Intent.CATEGORY_LAUNCHER); | |
| showTaskIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | 
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 | 
| <?xml version="1.0" encoding="utf-8"?> | |
| <LinearLayout | |
| xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content" | |
| android:orientation="vertical" | |
| android:showDividers="middle" | |
| android:divider="?android:listDivider" | |
| android:dividerPadding="16dp"> | |
| </LinearLayout> |