Written by Patrick Tulskie
Just a small thing. I was trying to find a good syntax highlighter for code on this blog and another one I’m about to start. After trying a few, I settled on highlight.js from http://softwaremaniacs.org/soft/highlight/en
You basically need to simply wrap your code in <pre><code></code></pre> and it handles the rest. Here’s an example:
class ThisIsRuby
def fun
puts "This is fun!"
end
end
test = ThisIsRuby.new
puts test.fun
On a semi-related note, I’m still chasing down some nginx config related gremlins. If you see anything weird, let me know in the comments.
Posted in
Uncategorized at December 9th, 2009.
2 Comments.
Written by Patrick Tulskie
I’ve been having some issues with the slice that the blog and some other applications were on the box. Over the past few weeks, MySQL has been crashing or perhaps SliceHost was rebooting my server and MySQL was not coming back up. It was all very mysterious to me, but I was unhappy with the overall setup anyway.
WebbyNode is a newer player in the VPS game and they offer basically the same setup as SliceHost at a lower price. I also like their ReadyStacks and github friendliness. I registered and built out a box with Nginx and Percona MySQL. Everything feels fairly snappy when I’m on the box despite being a low memory VPS.
Going forward I’m going to be moving Twexaminer.com over to this same VPS and run it through Nginx with Unicorn.
If anyone has any questions about the setup, let me know. If I get a chance later, I’ll try to come up with a short guide on how I got everything working.
Posted in
Uncategorized at December 7th, 2009.
2 Comments.
Written by Patrick Tulskie
Every Friday we have our code reviews at BeenVerified and it is definitely a non-trivial event. Our development team looks through the code all together and offers suggestions and ways to improve what the creator deems near-complete code. Code reviews have become my favorite part of team based development because they offer me such a badass opportunity to learn more. Everyone looks a problem differently and so getting insight from other people is huge because you might not consider all of your options when you’re knee deep in 1000 lines of ruby, CSS, and js all at once.
Yeah it’s great, except this Friday it didn’t happen. Thanksgiving weekend happened instead so we pushed it to Monday. Being the silly goose I am, I decided to get a new Macbook on Black Friday. I restored my stuff from Time Machine, installed my Ruby Gems, and thought all was well. Monday morning, my turn to present code came up and there was a problem with screen sharing. Crap. All of my code is in a git branch that is not pushed to a server yet and the time it would have taken to get to a state where we could present it from another machine would have been too much so we postponed my review until my screen sharing would work. This was most displeasing to me. Read More…
Written by Patrick Tulskie
Those of you doing rails development work on Leopard with MySQL have probably seen this error message when starting your app:
WARNING: You’re using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).
Normally I don’t care, but I figured since I was doing some cleanup today and getting things ready to move on to a longer term it might be good to have a properly working MySQL gem. I like to run with a system that is close to what we run production. The closer you get, the less surprises you have when you push it live.
Read More…
Written by Patrick Tulskie
The night time, it was great. Air was cool, had just gone on a nice jog with my girlfriend, and I was quite content with everything. Being that my girlfriend has my health in my best interest, she decided to give me some cereal to take home with me. I walk out to my car in my running shorts that have no pockets and I’m half juggling my clothes, laptop case, shoes, cereal, and… my Blackberry.
def for_the_record
running_shorts != skin_tight
end
I do what I can, placing my blackberry on the roof of my car, get everything inside the car and start driving home. I get about half way there and…
Read More…
Posted in
Uncategorized at August 27th, 2008.
No Comments.
Written by Patrick Tulskie
I decided to start writing a little series of articles based on the lessons I’ve learned in writing code the uses twitter, using twitter itself, and just generally getting the most out of it. This is the first one, and maybe there will be more depending on how I like it.
The Problem – Why You Should Care
Other sites that you pull content from are not always going to be reliable. They could be down, running slow, or some other possible problem. If you are using something like twitter to display your status on your site but you have a lot of other content you want people to see then it would be wise to use client-side scripting to get the content. You might be saying in your head “Oh but I have this sweet PHP script that does that for me.” but you should tell that voice in your head to shut up and just listen.
Read More…