Gnome Terminal Set Tittle
Create a function in ~/.bashrc: function set-title() { if [[ -z “$ORIG” ]]; then ORIG=$PS1 fi TITLE=”\[\e]2;$*\a\]” PS1=${ORIG}${TITLE} } Then use your new command to set the terminal title. It works with spaces in the name too. set-title my new tab title Source: https://unix.stackexchange.com/a/186167
Python Websocket Connection
Install websocket pip install websocket Run commands python3 import websocket import ssl ws = websocket.WebSocket(sslopt={“cert_reqs”: ssl.CERT_NONE}) ws.connect(“wss://echo.websocket.org”) ws.send(“ankara”) ws.recv() Kaynak: https://pypi.org/project/websocket_client/ Oto escape in messages: https://www.freeformatter.com/java-dotnet-escape.html#ad-output
16.04+ Gnome Flashback Dropbox ikonunu düzeltme
Kaynak: https://bugs.launchpad.net/ubuntu/+source/nautilus-dropbox/+bug/1767665/comments/3 Kaynak: https://askubuntu.com/a/1029282/411641 sudo sed -i “s/dropbox start -i/env XDG_CURRENT_DESKTOP=Unity dropbox start -i/” /usr/share/applications/dropbox.desktop mkdir -p ~/.config/autostart/ cp /usr/share/applications/dropbox.desktop ~/.config/autostart/dropbox.desktop
Ubuntu 16.04 Nautilus Pencere Çerçevesi
Kaynak: https://askubuntu.com/a/769765/411641 gnome-session-flashback yüklendikten sonra dosya yöneticisi varsayılan temada pencere boyutu değiştirmeye izin vermiyor. Aşağıdaki kodu ilgili dosyaya kaydedersek, pencerelerin çerçeve boyutu büyüyor ve kenarından tutup çekip sündürebiliyoruz. gedit ~/.config/gtk-3.0/gtk.css .window-frame { margin: 10px; } Logout, login işlem tamam.
Android UI
Framelayout içindeki elemanları birbirinin üzerine gelecek şekilde üst üste koyar. Overlapping elemanlar için kullanılabilir. Elevation değeri UI elemanının ne kadar yukarıda olduğunu belirler. Elevation değeri arttıkça alttaki gölge büyür. Ripple ve elevation kullanan bir widget yapmak için: https://www.youtube.com/watch?v=YPrjL3QKs5I Material design kurullarına göre kenar boşlukları 8’in katları, yazı boyutları 4’ün katları şeklinde olmalıdır. Material color kullanımı: Material … More Android UI
Gradle Basics
Gradle installation: https://gradle.org/install/ $ mkdir /opt/gradle $ unzip -d /opt/gradle gradle-4.7-bin.zip $ ls /opt/gradle/gradle-4.7 $ export PATH=$PATH:/opt/gradle/gradle-4.7/bin Gradle Tasks: https://docs.gradle.org/current/userguide/more_about_tasks.html In this simple Gradle build script we have defined a single task named “hello”. As you can see, the task’s action simply prints the string “Hello World” to the standard output. Gradle build scripts are … More Gradle Basics
Gradle Android
Android application plugin: https://docs.gradle.org/current/userguide/application_plugin.html Jcenter reposu Android Studio tarafından otomatik ekleniyor. Proje seviyesi build.gradle dosyası içinde. Build types are defined in the `buildTypes { }` script block. Android Studio automatically adds some additional configuration to the release build type for us. Although debug isn’t listed here, the debug build type still exists. Eğer bir uygulamanın farklı … More Gradle Android
Gradle JAVA
Gradle Java Quickstart guide: https://docs.gradle.org/current/userguide/tutorial_java_projects.html The Gradle user guide also has much more in-depth documentation on the Gradle plugin: https://docs.gradle.org/current/userguide/java_plugin.html Applying the Java plugin is simple, we need only add a single line to our build script. apply plugin: “java” There are four main tasks we’ll use most often: assemble, check, build, and clean. Assemble … More Gradle JAVA
Android Tips
Recycler View elemanlar arasına divider ekleme: Kaynak: https://developer.android.com/reference/android/support/v7/widget/DividerItemDecoration https://stackoverflow.com/a/40217754/891194 Up navigation recreates activity. <meta-data android:name=”android.support.PARENT_ACTIVITY” android:value=”com.example.myfirstapp.MainActivity” /> Ya bunu manifest içinde aktivite tagi içine koyuyorum: android:launchMode=”singleTop” ya da: @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { // Respond to the action bar’s … More Android Tips