1 2 3 4 5 6 7

User Image Linux Uygulamaları Jan. 13, 2016, 10:53 p.m.

 

  1. Pinta 
  2. Dia
  3. pycharm
  4. ninja
  5. sqliteman
  6. brackets
  7. sublime
  8. codelite
  9. geany
  10. wxformbuilder
  11. meld
  12. mono
  13. subcommander
  14. playonlinux
  15. dia
  16. ffmpeg
  17. dropbox
  18. google-chrome
  19. oracle-java
  20. wireshark
  21. team-viewer
  22. youtube-dl
  23. audacious
  24. avidemux
  25. mkvtoolnix
  26. vlc
  27. skype
  28. bleachbit
  29. bum
  30. boot repair
  31. nmapgui
  32. virtualbox
  33. filelight,jdiskreport,baobab
  34. freefilesync
  35. wxhexeditor
  36. numix
  37. conky
  38. thunderbird
  39. pinta
  40. subversion
  41. git
  42. libav
  43. fortunes-ubuntu-server
  44. filezilla
  45. acetone iso
  46. free file sync

Theme:

-Quartz

-Arc

-Numix  >> KDE Stuff

-4k flat material

wallpaper -> material design

qtcurve -> numix

color scheme -> material

window decoration qtcurve

cursor -> oxygen neon

Desktop theme -> arc dark

https://github.com/Bash-it/bash-it

User Image Python -Threading Jan. 12, 2016, 11:08 a.m.

Python Threading Örneği:

 

#!/usr/bin/env python2

import threading
import time


class MyThread (threading.Thread):
    def __init__(self, thread_id, name, some_more_variable):
        threading.Thread.__init__(self)
        self.thread_id = thread_id
        self.name = name
        self.some_more_variable = some_more_variable
        self.daemon = True # Ana islem sonlandiginda thread'de sonlanacak

    def run(self):
        # thread islemi
        pass


# Yeni threadler yarat
thread1 = MyThread(1, "Thread-1","other_variable")
thread2 = MyThread(2, "Thread-2","other_variable")

# Yeni threadleri baslat
thread1.start()
thread2.start()

sleep(50) # Ana thread. Buraya kod gelecek

# threadler bir sekilde kesilirse sonlandırıldığını garantilememiz gerekiyor
thread1.join() 
thread2.join()

 

Fonksiyonları:

  • run(): thread.start() ile tetiklenen fonksiyon. Asıl işi yapan method burası
  • start(): thread.start() , multhreading başlatır ve  run()  methodunu çağırır.
  • join([n]): n saniye sonra thread'i sonlandırır
  • isAlive(): thread hala çalışıyormu kontrol eder
  • getName(): thread'in adını döndürür
  • setName(): thread'in adını set eder
User Image Python - String Operations Jan. 7, 2016, 10:26 a.m.

Fastest way to construct a string :

text = "%d,C100,%s,,%s,V101,%s,0,1,#" % (self.message_counter, str(self.device_id), time_str, data_list[5]))

 

Rounding a float:

'%.5f' % .12345678

 

User Image Python - File Operations Jan. 2, 2016, 12:22 a.m.

Read file and split by lines :

with open("test.txt", "a") as myfile:
    myfile.write("appended text")

Open Modes:

 

ModesDescription
rOpens a file for reading only. The file pointer is placed at the beginning of the file. This is the default mode.
rbOpens a file for reading only in binary format. The file pointer is placed at the beginning of the file. This is the default mode.
r+Opens a file for both reading and writing. The file pointer placed at the beginning of the file.
rb+Opens a file for both reading and writing in binary format. The file pointer placed at the beginning of the file.
wOpens a file for writing only. Overwrites the file if the file exists. If the file does not exist, creates a new file for writing.
wbOpens a file for writing only in binary format. Overwrites the file if the file exists. If the file does not exist, creates a new file for writing.
w+Opens a file for both writing and reading. Overwrites the existing file if the file exists. If the file does not exist, creates a new file for reading and writing.
wb+Opens a file for both writing and reading in binary format. Overwrites the existing file if the file exists. If the file does not exist, creates a new file for reading and writing.
aOpens a file for appending. The file pointer is at the end of the file if the file exists. That is, the file is in the append mode. If the file does not exist, it creates a new file for writing.
abOpens a file for appending in binary format. The file pointer is at the end of the file if the file exists. That is, the file is in the append mode. If the file does not exist, it creates a new file for writing.
a+Opens a file for both appending and reading. The file pointer is at the end of the file if the file exists. The file opens in the append mode. If the file does not exist, it creates a new file for reading and writing.
ab+Opens a file for both appending and reading in binary format. The file pointer is at the end of the file if the file exists. The file opens in the append mode. If the file does not exist, it creates a new file for reading and writing.
User Image Linux'u Hızlandırmak Sept. 29, 2015, 11:32 p.m.

Disk Erişim Hızını İyileştirme:

Dikteki dosyaların her okunduğunda bir de okundu bilgisinin yazılmaması için noatime kullanılır(nodiratime da içerir). Journal 'i kapatmak için data=writeback, kullanılır.

/etc/fstab >> 

UUID=7f5392f8-939b-4149-9f04-8b377ad0cdb4 /  ext4  defaults,noatime,data=writeback,errors=remount-ro 0       1

# /tmp dizinini RAM'e bağlama
tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=512M 0 0

Bellek İyileştirmeleri:

/etc/sysctl.conf >>

#Swap kullanim oranini azaltir
vm.swappiness=10

# Inode kullanan sistem nesnelerinin daha uzun sure cache de kalmarini saglar
vm.vfs_cache_pressure=50

TTY Sayısını 3 e İndirmek:

/etc/default/console-setup >>

ACTIVE_CONSOLES=”/dev/tty[1-3]
sudo rm /etc/init/tty6.conf /etc/init/tty5.conf /etc/init/tty4.conf

Preload İle Sık Kullanılan Programları Önyüklemek:

sudo apt-get install preload

Hybernate Ve Sleep i kinit 'de başlatılmasını engellemek:

# Başına # koyarak yorum satırı haline getir:

# RESUME=UUID=427075a3-381d-466b-a8d4-d08e8d183b6c

 

User Image Ubuntu Paket Yönetimi Sept. 28, 2015, 5:36 p.m.

APT:

dpkg --get-selections | grep -v deinstall # list installed files
apt-get clean # clean apt cache
apt-get clean all # clean apt cache
apt-get autoremove # clean unneeded files

 

User Image Redmine Hataları ve Çözümleri Aug. 26, 2015, 11:34 a.m.

Sorun: 

Could not find climate_control-0.0.3 in any of the sources (Bundler::GemNotFound)

Çözüm:

bundle install --path vendor/cache

User Image Bash Progress Bar Aug. 25, 2015, 3:54 p.m.

 

#!/bin/bash

echo -ne '#####                     (33%)\r'
sleep 1
echo -ne '#############             (66%)\r'
sleep 1
echo -ne '#######################   (100%)\r'
echo -ne '\n'

Açıklama :

\r : Satırın başına gitmeye yarıyor

-n : '\n' yi yazdırma

-e : '\r' gibi ifadeleri yakalamak için

User Image Kernel Debug Mode Aug. 17, 2015, 4:01 p.m.
mount -t debugfs none /sys/kernel/debug/
cd /sys/kernel/debug/

 


1 2 3 4 5 6 7