apt update && apt upgrade -y
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
As configured in my dotfiles.
start new:
tmux
start new with session name:
sudo apt-get install python3-setuptools
sudo easy_install3 pip
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
| auth = "plain[/etc/ocserv/ocpasswd]" | |
| max-clients = 16 | |
| max-same-clients = 5 | |
| tcp-port = 443 | |
| udp-port = 443 | |
| keepalive = 32400 | |
| dpd = 90 | |
| mobile-dpd = 1800 | |
| try-mtu-discovery = true | |
| server-cert = /etc/ssl/certs/server-cert.pem |
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
| // This is a super simplified example of how to use the new dagger.android framework | |
| // introduced in Dagger 2.10. For a more complete, in-depth guide to dagger.android | |
| // read https://proandroiddev.com/how-to-android-dagger-2-10-2-11-butterknife-mvp-part-1-eb0f6b970fd | |
| // For a complete codebase using dagger.android 2.11/2.12/2.13/2.14, butterknife 8.7/8.8, and MVP, | |
| // see https://github.com/vestrel00/android-dagger-butterknife-mvp | |
| // This example works with Dagger 2.11/2.12/2.13/2.14. Starting with Dagger 2.11, | |
| // @ContributesAndroidInjector was introduced removing the need to define @Subcomponent classes. |
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
| <Button | |
| android:id="@+id/button1" | |
| style="@style/GlossyGradientButtonStyle" | |
| android:layout_width="wrap_content" | |
| android:layout_height="@dimen/button_height" | |
| android:minWidth="100dp" | |
| android:text="OK" /> | |
| <Button | |
| android:id="@+id/button2" |
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
| Reset Permission | |
| adb shell pm reset-permissions your.package.name | |
| Grant And Revoke Permission | |
| adb shell pm [grant|revoke] com.my.app android.permission.ACCESS_FINE_LOCATION | |
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"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.peirr.test"> | |
| <application | |
| android:allowBackup="true" | |
| android:icon="@mipmap/ic_launcher" | |
| android:label="@string/app_name" | |
| android:theme="@style/AppTheme"> |
- Two of the most useful shortcuts utilize the Fn (function) keys. It is therefore recommended that you enable the "Use all F1, F2, etc. keys as standard function keys" option [System Preferences > Keyboard].
- Be sure to enable the Mac OS X 10.5+ keymap in Android Studio [Preferences > Keymap].
- A fairly complete shortcut list can be found here.
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
| ; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32 | |
| global start | |
| section .text | |
| start: | |
| push dword msg.len | |
| push dword msg | |
| push dword 1 | |
| mov eax, 4 |
NewerOlder