Using SublimeText to write JSim file

50.002 Computation Structure course in SUTD requires students to write a kind of SPICE-like code using JSim, an MIT software to simulate circuit design. The editor, however, is pretty basic, and I have noticed that some students prefer to use SublimeText to write the JSim file. Here is the instruction to setup SublimeText to use with JSim.

  1. Download SublimeText.
  2. In Mac OS X, run SublimeText, press “CMD-SHIFT-P” to open the Command Palette. Otherwise, go to Menu -> Tools -> Command Palette.
  3. Type “browse packages” this will open a new Finder window with the location to install the packages.
  4. Create a new Folder called “JSim”.
  5. Download JSim syntax highlighter. Copy jsim.tmlanguage to the newly created folder “JSim”.
  6. Associate jsim extention to open with SublimeText. To do this (in Mac OS X):
    1. Find a JSim file, e.g. lab3.jsim. Right click and choose “Get Info”.
    2. Under “Open With”, choose “Sublime Text”.
    3. Click “Change All”.

UPDATE: There is some issue when using SublimeText in Ubuntu. A solution was to rename jsim.tmlanguage to jsim.tmLanguage (Note the capital “L”).

Advertisements

A free alternative to create Evernote notes from your email

As of July 2015, Evernote has changed its feature to create note from email to a “paid” service. Luckily, there are always alternatives. This post share with you how to do it for free using IFTTT.

  1. Create a free account with ifttt.com using the EMAIL that you want to use to create notes in Evernote. You will need to confirm your account by clicking the link from your email inbox.
  2. Once you are set, you can start creating recipe by clicking “Create a Recipe”  and then click “This”. create_recipeclick_this
  3. Select “Email” for your channel. trigger_channel
  4. And then select the trigger. choose_a_trigger
  5. To complete the trigger, key in the hash tag you want. You can create just one recipe with one hastag, let’s say “#evernote” or you can create multiple recipes with different hash tags. trigger_fields
  6. After that create the “Do” part. click_that
  7. Choose “Evernote” as the channel.  choose_evernote
  8. You will then have to authorize IFTTT to connect to your Evernote account by logging in to Evernote. connect_evernote
  9. Then, you can complete the action fields. In my body I chose “{{BodyHTML}}” rather than Body and I added “{{AttachmentUrl}}”. I decided to create a special Notebook to dump all my notes created from IFTTT. But as I said before, you can just create multiple recipes with different hash tags and for each hash tag you can set your notebook destination. action_fields
  10. Once, you are done, you can send email to create an Evernote note. email_evernote

Android emulator device not showing in Running Devices

Sometimes with the android virtual device running, I can’t seem to see them under the Running Devices when I click “run app”. To solve that, I need to restart my adb. To do that go to the “Android SDK/platform-tools” folder. In my case for Mac OS X, it is at:

/Users/my_user_name/Library/Android/sdk/platform-tools

From there I need to run the following command:

./adb kill-server
./adb start-server

Then you can check whether the device has been attached by:

./adb devices