About Stas Sușcov

A dude.

Building your own Heroku

When we started Risktronics, we really didn’t want to care about where should we host the app. Heroku seemed a pretty obvious choice, and in the end, the pleasure was all ours to use it and it was definitely a win… Well, at least for some time.

Our latest bill for Heroku was something we didn’t plan, at least not that soon:
our bill

The decision that followed was to move away from Heroku to an own server. All great, except the fact that this means we will have to change the way we were deploying the code and monitoring its health — things I didn’t want.

Below you will find the hooks I used to fire on a deployment using git. Beside detecting the Gemfile changes and running bundler, I really wanted a solution to restart/start the application on new commits.

We were already using foreman, and it’s great (solving problems like environment variables, sub-process spawning, master process), but in order to use foreman upstart integration, you would need root permissions or some other sudo magic. So for us, foreman has to live on a user level, and nginx should take care of stuff to proxy with it.
In the end, if you pre-set a port on which the app has to live, this should solve any other problems.

To recap, I eneded up with something like this, on every commit I make (including Gemfile changes):

Counting objects: 2347, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (1775/1775), done.
Writing objects: 100% (2347/2347), 330.17 KiB, done.
Total 2347 (delta 1533), reused 879 (delta 526)
remote: Master branch changes. Starting the deployment...
remote: Gemfile updated...
remote: Running bundler...
remote: Using rake (0.9.2.2)
...
remote: Using bundler (1.0.21)
remote: Your bundle is complete! It was installed into /home/app/.bundle
remote: Sending TERM to 19934...
remote: Starting the app...
remote: HEAD is now at aa2a2 My last commit
To git@ourserver.risktronics.net:apps/risktronics.net
 * [new branch]      HEAD -> master

Pretty cool, eh?!

About Ruby, Risktronics, CoWork, Pagina and Coursewa.re

(^^Not necessarily in that order…)

October 2011, 6th, I refuse one job proposal and reply back with sorry messages to another 2 emails. Later, one of the guys whom I refuse, picks up the Cluj CoWork concept, and builds probably the most awesome working space for freelancers in Cluj-Napoca (website to be launched soon).


First release in production since 6th of Oct. Nailed! Happy new year! http://t.co/1CXEZoER
@Risktronics
Risktronics

Meanwhile, 3 months later, the reason I refused those great people with interesting teams and projects gets online: Risktronics.net (about what I still can not disclose much, and yes, the deploy ended like 3 hours before 2012 New Year).
During these 3 months, with some cash from last GSoC, and a fuzzy idea, I switch to Ruby to build the startup that hopefully can “fix banks” or at least help people get credits easier, all this together with two old friends of mine.

Lately, here we are now, with a working prototype that after some tweaks will become open to public beta testing. As you expect, with no money, and no certain future :)

Looking back, recalling my mum and some friends question, “is it worth?”, the answer is definitely positive, but not in a “pinkish way”. Actually, deciding to do the opposite, would probably forever leave me with a sense of regret, and would never motivate myself enough doing something else than what I know already.

What would be fair to mention is that, jumping from one set of tools to another, makes you discover a lot of great stuff and needs which basically invites you to explore.


Updated Pagina gem, ditched Sinatra for plain Rack, code simplified a lot! https://t.co/lZLo5RIs
@Suscov
Stas Sușcov

To confirm the above, the same time, I wrote Pagina, which is a Rack web app, that came up from a simple idea of having your website content in your Dropbox (Stumbled upon Drop Pages later in winter 2011). Later Pagina is used to build the Coursewa.re and helps some friends of mine (they work as attorneys) finally integrate their website management tasks into daily workflow (they use Dropbox a lot for collaboration).


Check out the new version of #BuddyPress Courseware, and its beautiful new website! http://t.co/OHY8tEku @
@boone
Boone B. Gorges

Coursewa.re meanwhile brings no money/big-real-world-projects, but a lot of interest which both upsets me and pleases. Hopefully I can roll out in spring the SaaS platform I’ve been planing for one year or so…

To wrap up, there was a lot of fun for last couple of months, and I’m lucky I could meet so many great people and use so much great code.

ACTA, România

Apparently, while most of the Romanians were busy with „Băsescu” crisis and snow, our government decided to sign ACTA.

To be honest, I’m not sure who’s job was to inform European population about this upcoming decision, but they did it in the worst possible way. Anyway, if you feel the need of blaming your regional/representative politician, you can get his address from here: agenda.grep.ro.

For those who just woke up in this world, and have no clue what’s this all about, take a look at this video.

Let’s Hack Startups anunțat

În 20 Decembrie, va avea loc un eveniment orientat spre startup-uri, unde sunt invitate persoane interesate de entrepreneurship, sau mai tehnice, de WebOp.

Scopul evenimentului este de a strânge pentru câteva ore un grup de persoane clujene (și nu doar)
care încearcă sau au reușit să ridice un proiect pe cont propriu și care pot prezenta o experiență proprie interesantă.

Evenimentul va avea loc pe str. Emil Isac 23, în spațiul de cowork recent deschis: Ruby Tribe Coworking.

Până acum și-au anunțat prezența persoane din spatele:
* eval.me (speaker)
* sentimatrix.eu (speaker)
* rubytribe.ro
* risktronics.net

La eveniment se așteaptă mai ales studenți și tineri, care au ceva de arătat/povestit, sau au nevoie de ajutor.

Free pizza & beer after the event to support the conversations.

Evenimentul pe meetup.com
RSVP form here.

StartupWeekend Romania

Via @mihaigheza, în București va avea loc StartupWeekend Romania.

SWRomania

In a nutshell, SW este un eveniment care are loc în toată lumea și seamănă foarte mult a un Hackathlon, deși scopul acestui eveniment este de a încerca forțele comunităților locale de a crea un produs care poate rezulta într-un startup.

Pentru cei interesați, SW va avea loc în perioada 11-13 Noiembrie 2011 la Crystal Palace Ballroom, în capitală.

N.B.(personală): E frumos că încep să aibă loc evenimente de acest gen în România, însă decât 2 pe an în capitală (Yahoo Hackathlon), mai bine unul acolo, altul mai în Transilvania (aș paria că în Transilvania e loc de mai multă stofă de startup-guys). Plus că eu nu aș merge până în capitală pentru a programa…

Sysadmin’s Day

Reposted! Originally posted on 29th of July 2009.


Happy sysadmin day!
:)

Credits: pic and clip (click the pic to hear the clip).

Hacking a Samsung Galaxy S (GT-I9000)

Ok, so I have a friend that calls me today. He owns a Galaxy S, and his phone is totally locked, because he was using a visible pattern lock and some noob was trying to guess that pattern until the phone locked away.

The problem would not be a problem if he was using Google’s service for backing up the data, but he was not using it. So he calls me and asks if I can help him recover his phone, ideally preserving the data on it.

Challenge accepted!

First I rooted the device, that can be done easy by downloading SuperOneClick (search for exploit folder, where you will find the binary to be uploaded and executed). Later I installed su and busybox, to get some tools available.

Samsung guys are smart, if you boot into recovery, you will only have access to the system file-system, and not anything else. What I was looking for, was the place where Android stores the settings values, later, I found that what I was looking is an sqlite database, but we are getting there soon.

On a standard Android, the settings database we are interested in, should be available in your /data/data/com.android.providers.settings, but that’s not the case with Galaxy S, the Samsung engineers, created a dedicated partition for settings/contacts/etc databases, so all you are going to find using the standard path is a dummy place-holder. To get access to the real database, you will need to find the name of the device that has to be mounted.

The OS init.rc and recovery.rc files are the files that are “poked” when booting into normal and recovery modes. Knowing that recovery mode doesn’t help me much, I consulted init.rc. The device name was /dev/block/stl10. If you mount it, inside databases folder, you will find the real settings provider database.

Download that file (settings.db), and change the value of key lockscreen.lockedoutpermanently from 1 to 0 using sqlite3 tool. Once done, upload the file back to the phone. Replace the old file, chmod it to 0666 and chown it to the same uid and gid as it’s parent directory.

Reboot the phone! Done!

In the end, I can say that it took me some hours, and saved a complete Android reinstall, with a big probability of loosing all the data. Anyway, it was nice playing with the device.

:)

Reviewing Pagoda Box Cloud Services

If you are familiar with Google’s App Engine, or Heroku, well… Pagoda Box is a cloud service to deploy PHP applications (be those CMSs, blogs or framework based apps).

I mentioned Heroku as the closest example of what does Pagoda Box because:
* You are deploying with Git
* It’s very much integrated with GitHub
* You can scale in any ways (by adding more resources to current box or by cloning current box)
* You can enable and disable add-ons for every app you use (from dedicated MySQL to Memcache, though some are not yet available in private beta).
* Free plan for testing/deployment

Pretty nice so far. So what else gives you Pagoda Box:
* First of all, it doesn’t ask you about your credit card!!! (It is a feature!)
* Writeable directories!!!
* SSH access to your writeable directories
* Custom rewrite rules, PHP version and PHP environment settings
* Team members!!!
* Free DNS aliases!!!
* Awesome UI for every tool you will deal with on Pagoda Box
* Awesome Stats Dashboard

I’ve been invited to a private beta recently (you can ask for an invite on twitter), so I tested their services on a WordPress/BuddyPress + Courseware deployment. The only problem I had was the lack of a tool like Bundler where I could specify from where what to pull (git sparse checkout might be an option I already recommended).
You can clone my repository or just have a look at wp-config.php (hint: follow the $_SERVER keywords) and .box files I had to change to make WordPress run on Pagoda Box.

Give it a shot here: courseware.pagodabox.com.

By the way, looks like Ubuntu powers their boxes, I would love to find out more about what other free software they use.

Disclaimer: I’m not affiliated in any ways with the guys behind Pagoda Box, and what I wrote was done just because it was fun.

A not so bad CUBRID feedback

I took a chance to play around with CUBRID today (well it’s kinda new Open Source RDBMS, partially developed by Romanian engineers, claiming to be very fast and mostly compatible with MySQL solution). Reason for that was:

  1. I didn’t do something like this for years, lately, most of my research interests got away from servers administration and all the stuff that’s happening around it
  2. They started a contest that touched my feelings because of PHP being used and their nice WordPress support page (WordPress has nothing to do with the contest, but it uses PHP and MySQL and that connected the dots)
If you are still reading this article in the hope to find the contest answers, go away, it’s not about it. It’s about how ready is CUBRID for development and my experience with it on Ubuntu (Natty).
First of all kudos to the team for great set of pre-compiled builds and tools, but the lack of debs is a problem right now. Searching for CUBRID PPA took me to their Launchpad page, that is way outdated and that kinda pisses off developers that use Debian/Ubuntu, and a lot of them do! So even though the software looks easy to install, having a debs repo is a no excuse thing that should be done.
Also on this topic, none of the PDO or PHP driver packages worked for me (I’m using PHP 5.3.5-1ubuntu7.2 from Natty repos) so I had to install PEAR and compile one. From that point, the Nginx+PHP5-FPM+CUBRID_8.4.0 development environment was ready.
The contest problem itself is not a hard one, but reading it’s statement should lead you to discover interesting features of the CUBRID, along which I was pretty impressed with:
  • SQL tool Client-Server, Standalone execution mode
  • Cleaner SQL syntax, though pretty-much compatible with MySQL (no storage engines, encoding… just like the new <html> tag)
  • Service and user management tools (users are stored in plain text files, everything has a tool for it, servers are started per database, well defined ACL, all very clean and well designed)
  • Databases can have the home you want for them (you can create databases of what size you want and wherever you want inside your filesystem) and the renaming is a snap, also you can define an SQL file for those to use and so on… very smart!
  • Not the last, it was a pleasure to work with their latest “implicit type conversion” feature (More details here…).
Per all, it was worth spending a couple of hours playing with the technology, more than that, I also submitted a solution for their contest, so It might be fun too. Give it a try if you’re searching for a self hosted RDBMS solution for your start-up or just to hack.