Nginx + Cloudflare SSL

Now that cloudflare will support ssl on every domain you host with them, I wanted to get some of my domains setup to use it.

I didn’t really get around to setting up the ssl cert on my side, but since cloudflare supports it, I wanted to redirect people to use it (as a convince, not a security factory) so setup this basic nginx config.

It blindly trusts the header, so it is possible to hit these domains without ssl, but I don’t want to prevent it, just let those that want it in.

Figured it might be useful for others as well

GMing again

How far back does one go when telling a story? I’ve loved savage worlds since I played it at Gottacon 2 years ago. I loved how simple it was. How it made the focus having the adventure instead of doing the math. Since then, I’ve run a handful of games. I loved Daring tales from the Sprawl. It was very easy to run with the experience of DMing I had. Then came along the Science Fiction Companion and the Last Parsec Kickstarter. At this point I was really really excited about running more savage worlds, but I kept putting things off.

Well, the last two pieces of the had to be the anxiety based breakdown I had last year (And shout outs to the people I was about to talk too) and the subsequent doctors visits and medication. The last and final part was reading about the last parsec adventures at http://ilive4crits.blogspot.ca/

After all that, I decided as a way of learning to deal with my anxiety again, I’m going to stop putting things off and start GMing again. No campaigns, at least not yet, just something fun and light weight. To ease back into it, I gathered a group of people for a simple instance of of School Daze since I had not even played anything in a year, and not run anything in an even longer time.

After that success, I decided it was time to get back into something with a little more structure. This was Friday. I’ll admit, due to many factors, I was not nearly as prepared as I had wanted to be, but I knew if i kept using that as an excuse, I’d put it off. We decided to hand wave and bypass a bunch of stuff to just try to keep it smooth and fluid. Now that being said, I don’t think I’d run an interface zero game again any time soon. Its just too much more mechanics to learn when you are not comfortable with the base game. All in all, it was a great first attempt.

Going to attempt to write this up next.

Local Indie Production

Hey peoples out there in the grand land of the internet,

A friend of mine is involved in a local indie production. They have met their goal but every extra bit helps a lot.

I wanna date u

Update to the capistrano hack

So a while ago I had posted a hack that lets capistrano deploy code from a git server from behind a firewall.

So in a recent update to SSHKit they changed how they do ssh connections to use Threading and Pools. This broke my hack.

 

So long story short, I’ve updated my hack. This one uses net-ssh directly to make a forward.

Disclaimer: This works for us at $work, but I can’t claim it works anywhere else.

 

 

direnv is one of the coolest tools ever

I’ve always loved the idea of self contained environments but coming from doing perl and c/c++ a long time ago, I’ve never been able to really pull it off. It wasn’t until I encountered virtualenv for python that I finally got this working properly. I had encountered rvm’s gemsets before that, but they always seemed finicky at best.

I started to have complex vim configs, and bash rcs that tried to look at what directory you were in / file you were editing, and change configs accordingly. It never worked well. EditorConfig and vim-editorconfig helped a lot with that. No longer had to have really confusing vim configs. I could specify per project editor settings. I can’t wait till its more uniformly adopted.

That left bash configs though. Enter DirEnv. Its solved the second half for me. Makes all those configurations per project. A simple direnv edit . inside your project directory will open up $EDITOR. This lets you specify all kinds of things about that project. Anything you can do in bash you can do here. It works best with env variables but can do other things. I love the layout functions though.

layout node

adds node_modules/.bin to your path

layout python

Creates a new virtualenv and adds it to your path.
..etc

It makes it easy to work with heroku based apps as well. They do all your configurations as environment variables, its pretty easy to add a bunch of export statements to your direnv and emulate the same thing.

I’ve just submitted a simple patch to add layout perl. This makes local::lib so much easier to use per project.

I have to give Philip Nelson credit for letting me know about this toolset. Its changed how I develop applications. He and I disagree on exactly how to use it, but no matter how you do, it helps out.

Bash prompt linewrap with colors issues

So I’ve been fighting with trying to make a custom color prompt for a while now.

I’ve recently found out about tput to output color codes. That combined with local variables meant prompts became easier to read.

  local BG_RED=$(tput setab 1)

We started to create a custom prompt here for the team. Had all the info needed at a quick glance. Everything was good except long lines didn’t wrap properly. Ctrl+r would just get nutty.

So, after a lot of research and reading various forum posts, I found out that color codes should be wrapped in “\[...\]“. So example:

  local BG_CYAN=$(tput setab 6)
  local FG_GREEN=$(tput setaf 2)
  local RESET=$(tput sgr0)

  export PS1="\[${BG_CYAN}${FG_GREEN}\]\u@\h \[${RESET}\]$"

Note the \[ and \] wrapping the codes. This allows bash to properly figure out the length of the line. Note: I just grabbed random colors, I suspect this example looks bad.

I did find a slight exception

For the TITLEBAR (putty/xterm/screen) support:

case $TERM in
xterm*|rxvt*)
TITLEBAR="\[33]0;\u@\h:\w07\]"
;;
screen*)
TITLEBAR="\[33k\u$\h\]"
;;
*)
TITLEBAR=''
;;
esac

The \[ and \] should wrap the entire block as everything inside is considered part of the control code.

Feb 1st, 2014 – An unique milestone

This will be one of my rare non tech posts on this blog (I think).

As of today, Feb 1st, 2014, It has been now 10 years since my last relationship ended with the infamous words “You can still date me if you want”.

I’ve brought it up with friends, mostly because it’s a weird kind of rare milestone. Most people then ask how I feel about it. It’s taken a while to figure out what to say. I only recently realized it was almost 10 years (sometime in December maybe). I was talking to a friend about school and came across some old albums and realized when things last ended. I feel like being single has not really been a big deal in my life.

Now some people have gone along the lines “have you tried dating?” or “Are you ready now?”. I think that just highlights people don’t really understand. I’ve never avoided it. I even tried online dating several times. Online dating really isn’t for (someone like) me. It puts a lot of pressure on the first encounter. I’m well aware that many meet people from online dating sites and go on to stay friends, but I don’t think that’s the norm. I know when I tried I always tried to made it clear that I was happy enough even just to make new friends but I’m also aware of how many horrible people that frequent on those sites. After meeting and/or chatting with people, I realized it’s not the venue for me. I like getting to know people instead of instantly the comfortable way.

So how do I feel about being single for so long? Overall I don’t think I regret it. Sure there are times when that’s not true, but they pass pretty quickly. It’s usually the moments when you realize you are the only person in a room that hasn’t paired up with someone. I would say none of the people I hang out with regularly has ever held that against me, but it does come up from time to time.

So is my status ever going to change? Who knows. I’m really happy where the path of life has taken me so far. I have some amazing friends. Met some amazing people. I love my job. I’m going to continue to go out, do things, meet new people if I can, and who knows, one day I might find that someone special, but I would never want to force it. It’s not who I am.

(Lets hope this comes across as positive as I wanted)

Capistrano3 – Deploying with internal git server

Edit: I updated my “hack” to work with newer versions of capistrano/sshkit – http://www.halkeye.net/2014/06/06/update-capistrano-hack/

To set the scene. New team has been using capistrano to deploy some of its apps (all internal/behind our firewall). So new POC project comes along. Nothing sensitive but needs to be publicly accessible. I get very excited because this is the first time I’ve setup capistrano from scratch. I follow the getting started guide. Deploy to internal test. No problem there. Go to deploy to the amazon box (Go Free Tier) and fail… Riiight, can’t talk to our git server.

So spend a while scouring the internet for how to solve this problem. Can I just SCP? Its not that important right now. Hrm. That doesn’t seem to work reliably. Lots of solutions, none of which seem very clear and/or work with cap3. So I give up searching. This should be easy right? Just setup a remote tunnel. I open a new window, create  tunnel, edit my config, and bang. Deployed. Yay!

But wait, this is going to get annoying fast. Plus others will have to do that manual process as well. How do I automate this? Scour the internet for a while. Again, no real automation and/or doesn’t work with cap3.

Well fine, I always need the excuse to learn more about ruby, so start digging into the code. Its using pre-existing open source modules so it shouldn’t be that hard. After a bunch of learning, and giving up, I decided to skip on the nice clean solution and just start overriding some things.

So here it is, config/deploy/production in all its glory:

YAOIRPG

tl;dr – http://yaoirpg.halkeye.net is now live again

Yet Another Online Interaction Role Playing Game was a project a group of us at BCIT put together. It was for some of internet studies course (Yea I’m that old / It hadn’t been updated yet). Evan, the guy who named it, was also someone who spent a lot of time online and really enjoyed the idea of an acronym that people probably wouldn’t get.

So YAOIRPG was born. We had to do lots of paperwork. Project Docs, Design Docs, ETC ETC. But we found everyone loved playing it. I actually got killed several times while I was trying to demo the game to the class. It was fully multiplayer. Not bad for a school project. We were not expected to finish it, just document the process. There was only one other team that manged to get something demoable (I think), and they had a simple app that transferred files.

Anyways, it came up in conversation recently, mostly because I still tell the story that the teacher was heard saying he loved yaoi and we in the know at the time were so amused by this.

I realized the code wasn’t backed up, so I dug through some of my old hard drives, found the code and an old DB dump and this morning through a lot of trial and error (And actually minimal work) got it running in a recent version of php and mysql.

http://yaoirpg.halkeye.net now lives on heroku where it should forever run. Backed up to bitbucket ’cause I’m pretty ashamed of the code :D

2013 In Review.

Everyone else has started to do this. I’ve been working on it for a week now for my own reasons. I apologize in advance. Overall I’d say 2013/30 has been an amazing year. (Posting it to the rarely used blog so I don’t have to copy and paste all the text cross social networks.

* Lost like 40 pounds, really gotta work at doing more (Esp since I seem to be finally gaining weight again :(). Got heavily into using the slow cooker which helped a lot with this.
* New job at telus seems to be going amazing so far (I especially can’t wait for any of the prototypes my team are playing with to make it out to the public)
* Awesome friends, especially the new ones i’ve made this year (Reconnecting with noggery, Yvonne, Raine, Katrina, Meeting Roslyn, Justin, and recently Annie. Loads more people I probably forgot it was this year)
* Best birthday in years (lots of room for improvement so can only go up from here)
* Had lots of run doing redditgifts. It keeps giving me big anxiety, but it helps me learn to deal with it in a controlled way, so yay!
* Raine/Alex wedding, Yvonne/Eric wedding
* Salty Stories launched. Didn’t do as well as I had hoped, but it launched I can say I’m an app developer now.
* Nigel (airg Ireland) and Brian (Blizzard) moving away. Boooo
* I’ve had a lot of fun with kickstarter, only real complaint so far is the ouya. I still think pebble should win kickstarted of the year award.
* Went to some events by myself (Including an awesome wedding and a gentlemen hecklers show).
* Started to GM/Run Games.
* Generally focus more on the good, try to get less caught up on the bad.
* Pebble

So much more. Lets see if 2014 can be even better.

Things I wish I had done but didn’t:
* Post more to the blog. I meant to while I was job hunting. Started to clean up older posts thinking I might convert to octopress. Then I just didn’t finish ’cause I spent too long trying to track down old broken image links.
* Finish Projects (See above). When they are personal projects I tend to do the learning/prototype stuff, but not follow through enough. Made a couple android apps. Went “yea, I totally can do it” but didn’t finish the polishing steps as they are just for me.

Oh! Some automated 2013 things:
* https://www.vizify.com/gavin-mogan/twitter-video
* https://plus.google.com/107775609316541886610/posts/VMKeoGGpRNb

Go to Top