About Me

My photo
Drum & Bass Producer, Software Developer, Love my Cats

xcode crashing? here's how to fix it

if you get more than usual xcode crashes, simply:
1. right-click the project and/or workspace you're working on
2. select "show package contents"
3. remove the folder named "xcuserdata" with your username in it
now it should crash less - like normal :)

How to Remove or Disable Flash in your Chrome Browser

I attended a security meetup last night, and the presentation they gave really reinforced my understanding of how dangerous Flash is.

So I headed over to disabling Flash on my Chrome browser.

This is how it's done:
1. Go to this URL : chrome:plugins
2. Disable Flash

I hope this helps you in Disabling Flash in your Chrome Browser and may we all together bring Flash to the retirement phase together :)

Adding Android adb tool to your $PATH

Android Studio v1.2 installs the adb tool in this path:
So it goes like this:
  1. Run Terminal
  2. run adb version and expect an error output
  3. touch ~/.bash_profile
  4. open ~/.bash_profile
  5. add the above path before the 'closing' :$PATH
  6. source ~/.bash_profile
  7. run adb version and expect an output
Good luck!

Configuring Android Studio for Unit Testing mini-guide

I compiled a mini guide for configuring your project to use unit tests in Android studio, utilizing the mature JUnit framework:
  1. Create a folder in which you'll write all your unit tests (preferably com.example.app.tests)
  2. Create a new test class (preferably NameOfClassTestedTests, i.e BankAccountLoginActivityTests)
    1. Extend InstrumentationTestCase
    2. Write a failing unit test to make sure we succeeded configuring unit tests
    3. Note that a unit test method name must start with the word “test” (preferably testTestedMethodNameExpectedResult() i.e testBankAccountValidationFailedShouldLogout())
  3. Configure your project for unit tests:
    1. Open the 'Run...' menu and click 'edit configurations'
    2. Click the + button
    3. Select the Android Tests template
    4. Input a name for your run configuration (preferably 'AppName Tests')
    5. Select your app in the module combobox
    6. Select the “All In Package” radio button (generally you'd want to select this option because it runs all unit tests in all your test classes)
    7. Fill in the test package name from step 1 (i.e com.example.app.tests)
    8. Select the device you wish to run your tests on
    9. Apply and save the configuration
  4. Run unit tests (and expect failure):
    1. Select your newly created Tests configuration from the Run menu
    2. Click Run and read the results in the output console

Good luck making your code more readable, maintainable and well-tested!

Raspberry Pi no audio how to fix no audio in rpi

I reinstallled my rpi and got no audio out
The solution I found was:
1. install alsa utils by running the following command in the terminal:
sudo apt-get install alsa-utils
2. selecting the required audio out channel, where 0 is auto, 1 is phones and 2 is HDMI:
sudo amixer -c 0 cset numid=3 {out-number}