13 Haziran 2020 Cumartesi

Prevent idle SSH timeouts: client_loop: send disconnect: Broken pipe

If there is no package transfer happens during SSH sesison,  sshd automatically closes that session. On Ubuntu, in order to prevent that;

Open sshd_config using vim:

vim /etc/ssh/sshd_config

Add lines:

ClientAliveInterval 60
ClientAliveCountMax 720

And then apply changes by restarting sshd;

sudo /etc/init.d/ssh restart
---
ClientAliveInterval configures the server to send null packets to clients every 60 seconds and ClientAliveCountMax configures the server to close the connection if the client has been inactive for 720 intervals that are 60*720 = 43200 which equals 12 hours.

23 Mayıs 2020 Cumartesi

Intellij Gradle debug Cannot resolve constructor 'new groovy.lang.GroovyClassLoader(_$_23parentLoader)' error

While using IntelliJ IDEA Community Edition for debugging my Gradle task, at some point I needed to evaluate expression to see what is current state of the project.

When I type expression and hit to evaluate button, result area displays an error message

Cannot resolve constructor 'new groovy.lang.GroovyClassLoader(_$_23parentLoader)'

In order to fix that, I change expression language from Groovy to Java.


3 Ağustos 2017 Perşembe

Gran Turismo 6 Terms of Use for Online Services bug

If you have an error from your GT, "Unable to connect to the server, as you have not yet agreed to the Terms of Use for Online Services" probably you changed your PSN account language. For workaround this bug, you need to revert back this language change. Also you may see this warning: "You cannot proceed any further without agreeing to the Terms of Use for Online Services"

28 Temmuz 2017 Cuma

Android Studio 3.0, Intellij IDEA 2017 klavye kısayol problemi

Mac kullanıcısı olarak normalde "cmd+." olarak kullandığınız "comment with line comment" Android Studio 3.0 ile çalışmıyor mu? Bunun sebebi Intellij IDEA 2017.1 ile gelen bir bug. Keyboard layoutları için yapılan bir geliştirme var (bundan sonra comment line shortcut'ı Türkçe-Q layout'u için cmd + shift + 7 olarak güncellenecek, ancak bug yüzünden olamıyor)

Mac cihazınızda bu problemi aşmak için yapabileceğiniz;

Help -> Edit Custom Properties diyerek açılan idea.properties dosyasına şu satırı eklemeniz :

com.jetbrains.use.old.keyevent.processing=true

Sonrasında idea'yı restart ederek "CMD + ." kısayolunu "comment with line comment" kısayolu için kullanmaya devam edebilirsiniz.

Bug sayfasına ve ilgili workaraound için aşağıdaki linki kullanabilirsiniz:

https://youtrack.jetbrains.com/issue/IDEA-165950#comment=27-2053321

6 Haziran 2017 Salı

Unable to import DeviceCheck, CoreNFC in XCode 9 Beta while using Swift

for import DeviceCheck and Core NFC in XCode 9 you need to use real device as target because there is no x86 version of DeviceCheck and Core NFC frameworks.

Related pages:
Unable to import CoreNFC:
https://forums.developer.apple.com/message/232384#232384

Unable to import in CoreNFC in swift project Xcode 9 beta:
https://stackoverflow.com/questions/44386023/unable-to-import-in-corenfc-in-swift-project-xcode-9-beta

31 Mayıs 2017 Çarşamba

How to solve macOS wifi speed fluctuation, low speed problem?

There may be a too many reason but for me, unknowingly, reason is mDNSResponder daemon.

On macOS Sierra version 10.12.4 (I faced same problem El Capitan, too), when I download something in high speeds, sometimes speed drops to 0kbps and after few seconds it starts to download in 100mbps again. This fluctuation occurs occasionally but when it occurs it stays until I restart the computer.

The reason behind this problem is mDNSResponder daemon. For resolve issue, you can;

- Open Activity Monitor
- Jump to Network tab (for finding mDNSResponder process easily)
- click on mDNSResponder
- click X button which left of to the info button.(Force process to quit)
- exit from the process using "Force Quit" button



Or, if you are a terminal guy,

ps aux | grep mDNSResponder
sudo kill -9 <pid>

14 Temmuz 2016 Perşembe

XCode8 iMessage Swift 2.3 dyld: Symbol not found: __swift_getInitializedObjCClass ,Message.appex/../../Frameworks/libswiftCore.dylib

dyld: Symbol not found: __swift_getInitializedObjCClass
Referenced from: derived_path/PlugIns/Message.appex/Message
Expected In: derived_path/PlugIns/Message.appex/../../Frameworks/libswiftCore.dylib
in derived_path/PlugIns/Message.appex/Message

This problem occurs because of the difference of the target swift versions . You need to set swift version same in the both of the main target and imessage extension target.

Related apple developer forum post : https://forums.developer.apple.com/thread/48740

XCode8 How to use CocoaPod frameworks written in Swift 2.3 (CocoaPods Lagecy Swift)

If you are developing iOS apps with using XCode8 (with Swift 3.x or Swift 2.3) but your CocoaPod project always gets compile error because of your 3rd party targets implemented in Swift 2.3, you need to set SWIFT_VERSION property in build settings to '2.3'.

For dynamic frameworks, this property shown as "Use Legacy Swift Language Version" - Yes, No.

But after every pod update, CocoaPods removes this settings from Pods project and you need to set this settings again, manually.

To acheive this problem, you can use post_install script below in your Podfile :


9 Haziran 2016 Perşembe

Jenkins xcodebuild DVTAssertions: ASSERTION FAILURE DVTFrameworks-10179/DVTFoundation/Multicore/DVTFuture.mm:365

I faced DVTAssertions: ASSERTION FAILED problem today, when I try to build iOS swift project with Jenkins.

To solve problem, I just eject the connected iPhone from Mac's USB port. Still I don't know what is the reason. Problem occured only on Jenkins, not XCode.

Full build log:

xcodebuild[4174:49484]  DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-10179/DVTFoundation/Multicore/DVTFuture.mm:365
Details:  Attempted to transition to the failed state, but did not provide an error.

    Progress:    Initial
    Result:      (null)
    Error:       (null)
    Started at:    0   -[DVTFuture init] (in DVTFoundation)
  1   -[DVTFuture initWithBlock:] (in DVTFoundation)
  2   DVTDownloadable_AsyncInstallPackages (in DVTFoundation)
  3   __61-[DVTDownloadableOperationDownload downloadableOperationMain]_block_invoke.284 (in DVTFoundation)
  4   __61-[DVTDownloadableOperationDownload downloadableOperationMain]_block_invoke.310 (in DVTFoundation)
  5   DVTDownloadable_PerformBlockWithAttachedDiskImage (in DVTFoundation)
  6   -[DVTDownloadableOperationDownload downloadableOperationMain] (in DVTFoundation)
  7   -[DVTDownloadableOperation main] (in DVTFoundation)
  8   -[__NSOperationInternal _start:] (in Foundation)
  9   __NSOQSchedule_f (in Foundation)
 10   _dispatch_client_callout (in libdispatch.dylib)
 11   _dispatch_queue_drain (in libdispatch.dylib)
 12   _dispatch_queue_invoke (in libdispatch.dylib)
 13   _dispatch_root_queue_drain (in libdispatch.dylib)
 14   _dispatch_worker_thread3 (in libdispatch.dylib)
 15   _pthread_wqthread (in libsystem_pthread.dylib)
 16   start_wqthread (in libsystem_pthread.dylib)

    Finished at: (null)
Object:   
Method:   -_internalSetState:result:error:
Thread:   {number = 22, name = (null)}
Hints: None
Backtrace:
  0   -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
  1   _DVTAssertionHandler (in DVTFoundation)
  2   _DVTAssertionFailureHandler (in DVTFoundation)
  3   -[DVTFuture _internalSetState:result:error:] (in DVTFoundation)
  4   ___Z39DVTDispatchLockPerformLockedWriterBlockIU8__strongU13block_pointerFU13block_pointerFvvEvEEDTclfp0_EEP15DVTDispatchLockT__block_invoke (in DVTFoundation)
  5   _dispatch_client_callout (in libdispatch.dylib)
  6   _dispatch_barrier_sync_f_invoke (in libdispatch.dylib)
  7   DVTDispatchBarrierSync (in DVTFoundation)
  8   -[DVTDispatchLock performLockedBlock:] (in DVTFoundation)
  9   decltype(fp0()) DVTDispatchLockPerformLockedWriterBlock(DVTDispatchLock*, void () block_pointer () block_pointer __strong) (in DVTFoundation)
 10   -[DVTFuture setState:result:error:] (in DVTFoundation)
 11   -[DVTFuture failWithError:] (in DVTFoundation)
 12   __DVTDownloadable_AsyncInstallPackages_block_invoke_2 (in DVTFoundation)
 13   __DVTDispatchAsync_block_invoke (in DVTFoundation)
 14   _dispatch_call_block_and_release (in libdispatch.dylib)
 15   _dispatch_client_callout (in libdispatch.dylib)
 16   _dispatch_root_queue_drain (in libdispatch.dylib)
 17   _dispatch_worker_thread3 (in libdispatch.dylib)
 18   _pthread_wqthread (in libsystem_pthread.dylib)
 19   start_wqthread (in libsystem_pthread.dylib)
Build step 'Xcode' marked build as failure
Finished: FAILURE

24 Ağustos 2015 Pazartesi

vmware,virtualbox sanal diskleri (vmdk) birden fazla dosyaya bölmek

VMware sanal diskleri .vmdk uzantılı dosyalarda tutuyor. İnternetten doğrudan bir sanal işletim sistemi indirmişseniz ve bunu fat32 ile formatlanmış bir usb bellekte taşıyorsanız, sanal diskinizi birden fazla dosyaya bölmeniz gerekebilir.

Bölme işlemi için kullanacağımız uygulama, vmware-vdiskmanager.exe. Yalnızca VMware player kullanıyorsanız ve bu dosya elinizde yoksa, doğrudan vmware'ın sitesinden ücretsiz olarak bu aracı edinebilirsiniz. En son http://kb.vmware.com/kb/1023856 adresinde attachments kısmındaydı.

2gb boyutunda, kullanıldıkça allocate edilen diskler için :

vmware-vdiskmanager.exe -r old.vmdk -t 1 new.vmdk

2gb boyutunda, önceden allocate edilen diskler için :

vmware-vdiskmanager.exe -r old.vmdk -t 3 new.vmdk

Disk types:
     0                   : single growable virtual disk
     1                   : growable virtual disk split in 2GB files
     2                   : preallocated virtual disk
     3                   : preallocated virtual disk split in 2GB files
     4                   : preallocated ESX-type virtual disk
     5                   : compressed disk optimized for streaming
     6                   : thin provisioned virtual disk - ESX 3.x and above


Not : .exe diyerek işlemi windows altında yaptığımı da açık etmiş oldum. Aynı uygulamanın linux versiyonu da bulunmakta.
-----

Aynı işlem VirtualBox altında;

VBoxManage clonehd old.vmdk new.vmdk --format VMDK --variant Split2G

Komutuyla yapılabiliyor.

23 Temmuz 2015 Perşembe

Linux ile rar dosyalarını açmak

Linux altında rar dosyalarını açmak için kullandığım yöntem 7zip + 7zip-rar paketi kombinasyonu.

ubuntu türevi dağıtımlarda bunu :

sudo apt-get install p7zip-full p7zip-rar

komutu sonrasında

7z e rar-file.rar

komutlarıyla gerçekleştirmek mümkün.

7z komutları listesi ise şu şekilde :


Usage: 7z <command></command> [<switches>...] <archive_name> [<file_names>...]
       [<@listfiles...>]

<commands>
  a: Add files to archive
  b: Benchmark
  d: Delete files from archive
  e: Extract files from archive (without using directory names)
  l: List contents of archive
  t: Test integrity of archive
  u: Update files to archive
  x: eXtract files with full paths
<switches>
  -ai[r[-|0]]{@listfile|!wildcard}: Include archives
  -ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
  -bd: Disable percentage indicator
  -i[r[-|0]]{@listfile|!wildcard}: Include filenames
  -m{Parameters}: set compression Method
  -o{Directory}: set Output directory
  -p{Password}: set Password
  -r[-|0]: Recurse subdirectories
  -scs{UTF-8 | WIN | DOS}: set charset for list files
  -sfx[{name}]: Create SFX archive
  -si[{name}]: read data from stdin
  -slt: show technical information for l (List) command
  -so: write data to stdout
  -ssc[-]: set sensitive case mode
  -t{Type}: Set type of archive
  -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
  -v{Size}[b|k|m|g]: Create volumes
  -w[{path}]: assign Work directory. Empty path means a temporary directory
  -x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
  -y: assume Yes on all queries

</switches></commands></file_names></archive_name></switches>

22 Temmuz 2015 Çarşamba

Mac OS Internet Recovery yükleme problemi ve f2002 hatası

Internet recovery olayına güvenerek Macbook'unuzun tüm diskini silmişseniz ve recovery ekranında bilgisayar kilitli kalıp belli bir süre sonrasında da f2002 hatası alıyorsanız, Apple'ın recovery serverına ulaşamıyorsunuz demektir.

Amerika'da olsak, sunucular ayakta olmayabilir diyebilirsiniz. Ancak Türkiye için, internet sağlayıcıdan kaynaklı bir problem olması muhtemel.

Bir superonline kullanıcısı olarak bende meydana gelen hata, superonline dns çözümleyicisinin Apple sunucularının ip adreslerini bulamıyor oluşuydu.

Çözüm için :
1 - Cep telefonunuzda kullandığınız internet ücretsizse ya da ucuzsa telefonunuzu hotspot olarak kullanarak operatörünüz üzerinden bağlantı kurmayı deneyin.

2 - Modeminizin DNS ayarlarını değiştirebiliyorsanız, OpenDNS ya da Google DNS gibi serviler üzerinden bağlantı kurmayı deneyin.

3 - Modeminiz DNS ayarlarını değiştirmeye izin vermiyorsa, (Bana verilen Huawei modeli bu şekildeydi) ağa bağlanan bir başka bilgisayarın DNS ayarlarını değiştirerek internetini ad-hoc olarak yeniden açmayı deneyin.

Kritik olan bir şekilde Apple bilgisayarınızın Apple sunucularının ip adreslerini çözümlemesini sağlamak.

Kolay gelsin.

15 Haziran 2015 Pazartesi

Git push error '[remote rejected] master -> master (branch is currently checked out)' hatası

Git push error '[remote rejected] master -> master (branch is currently checked out)' hatası

Remote repository bare repository'e çevrildiğinde bu hata sonlanıyor. Aşağıdaki komutun remote lokasyonda çalıştırılması gerekiyor.

git config --bool core.bare true

Ayrıntılı kaynak : http://stackoverflow.com/a/3251126/860189

16 Şubat 2015 Pazartesi

[.Net Framework] Kullandığım decompiler ve obfuscator

.Net Framework uygulamalarını geliştirme sırasında compile edilen dll dosyalarını incelemek için ve bu dosyaları karıştırmak için şu anda aşağıdaki uygulamaları kullanıyorum :

Decompiler : ILSpy
Obfuscator : ConfuserEx


Oracle "The specified store provider cannot be found in the configuration, or is not valid.” hatası ve çözümü

.Net framework ile ODAC üzerinden Oracle veri tabanına kayıt sırasında aşağıdaki gibi hata almıştım :

System.ArgumentException: The specified store provider cannot be found in the configuration, or is not valid. ---> System.ArgumentException: Unable to find the requested .Net Framework Data Provider.  It may not be installed.
   at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
   at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)

Üstelik bu hata, uygulama 32 bit olarak çalıştırıldığında alınmamasına rağmen 64 bit kullanılırken alınıyordu.

Bunun nedeni olarak, yüklü ODAC'ın .Net framework'e ait 32 bit machine.config dosyası üzerinde değişiklik yapmasına rağmen, 64 bit için olan machine.config dosyası üzerinde ilgili değişiklikleri yapmıyor olması.

Çözüm için 64 bit machine.config dosyası içerisine oracle managed data access provider ile ilgili satır eklenebilir.

Daha kolay olan ise, ODAC'ın 64bit versiyonunun yeniden makineye kurulması.
--
Kurulumu live makine üzerinde yapmıştık ve ODAC versiyonu 11'den 12'ye yükselmişti. Makine üzerinde çalışan çok fazla uygulama olmadığından bir problemle karşılaşmadık.

ODAC dizini içerisinde doğrudan bir değişikliğe gitmemişseniz kurulum bir problem yaratmayacaktır. Yalnız TNS bilgilerinin bir yere kopyalanması unutulmamalı.

ILMerge kullanımı

Bilgisayarda environment veriables'a ILMerge'ün uygulama yolunu eklemeyi sürekli olarak unuttuğumdan, doğrudan kopyala yapıştır yapmalık örnek komut kullanımını buraya koyuyorum.

"C:\Program Files (x86)\Microsoft\ILMerge\ilmerge" "in1.dll" "in2.dll" "in3.dll" /out:"cikti.dll"

Environment variables'a eklemiş olsaydım bu komut aşağıdaki gibi kullanılacaktı :
ilmerge "in1.dll" "in2.dll" "in3.dll" /out:"cikti.dll"

2 Aralık 2014 Salı

Windows 7 Hesap Makinesi karakterlerin yarım görünmesi problemi

İş yerindeki Windows 7 kurulu bilgisayarda "Hesap Makinesi" (calc) programında karakterlerin üst üste binmesi, yarımının görünmesi gibi bir problem vardı.

Görüntü :

Çalıştır (Win + R) diyerek "sfc /scannow" komutunu çalıştırdım ancak hiçbir işe yaramadı.

Bunun üzerine;

registry'de  [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes] altındaki MS Shell Dlg,162 kaydını "Microsoft Sans Serif" olarak güncelledim ve problem düzeldi.

Eski kayıt "MS Shell Dlg,162" şeklindeydi. İnternet üzerinde "MS Shell Dlg,204" kaydı için benzeri işlemi yapanlar da var. Bulunduğunuz lokasyona göre bu anahtar değişiklik gösterebilir. Önemli olan, anahtara karşılık gelen değerin "Microsoft Sans Serif" olarak güncellenmesi.

Son hali :


17 Kasım 2013 Pazar

Kullandığım Alt Yazı Editörü (Subtitle Editor)

Diziler, filmler için bulunan alt yazılarda senkronizasyon problemi olduğunda kullandığım alt yazı editörü :

Subtitle Edit : http://www.nikse.dk/subtitleedit/

27 Eylül 2013 Cuma

Maven Türkçe karakter build problemi

Windows altında sistem lokalinizi ve karakter kodlamanızı İngilizce yaptığınız halde, maven ile build işlemi yaptığınızda Türkçe karakterler sıkıntı yaratıyorsa (Ör: 'I' karakterinin build sırasında 'ı' yapılması gibi); bunun nedeni java lokalinizin hala cp1254 olması olabilir.

Problemi düzeltmek için mvn komutunuzu;
-Dfile.encoding=cp1252 komutuyla çağırabilirsiniz. Ör : mvn -Dfile.encoding=cp1252 clean compile

Eğer ben bununla uğraşmam diyorsanız, Environment Variables altındaki MAVEN_OPTS variable'ına -Dfile.encoding=cp1252 değerini ekleyebilirsiniz.

Güncel encoding değerini mvn --version ile inceleyebilirsiniz.

Ekleme :
Eğer locale değerini de değiştirmek isterseniz variable'ına -Duser.country=US -Duser.language=en ' parametrelerini ekleyebilirsiniz.

Microsoft Word belgesi içerisinde geçen tüm mail adreslerini alma

Microsoft ve ürünlerini çok fazla sevmesem de, biraz da zorunluluktan Microsoft Office Word'ü kullanıyorum. Elimdeki metin belgesi içerisinden tüm email bilgilerini çekmem gerekti. Belgede yüzlerce mail adresi olduğundan da, elle kopyala yapılştır yapmak zaman alıcıydı.
Örnek :

Örnek belge şu şekilde :
Asdfasdf : ali@ali.com
İkinci adamımız burada : veli@veli.com
Komikmiş bu da : komik.li@komikli.com
Subdomainli : sub@sub.domain.com
Belge içerisindeki tüm mail adreslerini almak için kullanılacak yöntemse :
Word -> Gelişmiş Bul (Advenced Search) -> Aranan kısmına şunu girmelisiniz :
[a-zA-Z0-9\-_.]{1;}\@[a-zA-Z0-9\-_.]{1;}
"Joker karakter kullan" seçimini aktif hale getirmelisiniz.
"Bulunacak Yer" kısmından "Asıl Belge" 'yi seçmelisiniz. Şu an aşağıdaki duruma gelmiş olmalısınız :

"Bul ve Değiştir" ekranını kapattığınız anda mail adresleri hala seçili kalacaktır. Ctrl + c kombinasyonuyla seçili mail adreslerini kopyalayıp istediğiniz bir yere Ctrl + v ile yapıştırabilirsiniz.
Sonuç :
sub@sub.domain.com
komik.li@komikli.com
veli@veli.com
ali@ali.com
Kolay gelsin.

Related Posts Plugin for WordPress, Blogger...