Författararkiv: George

Om George

Founder of the Boolean algebra

Vi behöver bli fler!

Vi söker ständigt personer som är duktiga och brinner för det de gör. Samt vill jobba på ett personligt IT-bolag som befinner sig i stark tillväxtfas. Just nu letar vi extra efter följande personer. Du kan söka tjänsterna direkt på www.uptrail.com

Vill du bli en del av vårt team av Sveriges vassaste SharePoint-utvecklare? Vi söker dig som har eller vill få stor och bred erfarenhet inom SharePoint-plattformen och kringliggande Microsoft-produkter. Läs mer om tjänsten.

Presale och Lösningsarkitekt
Som Presale och Lösningsarkitekt hos oss kommer du att sättas på prov hos kunder där det ställs höga krav på kompetens och förmåga att driva arbetet framåt, du kommer att ansvara för att sälja in nya projekt hos nya och befintliga kunder. Läs mer om tjänsten.

Säljare på Stockholmsmarknaden
Som säljare hos oss kommer du att sättas på prov hos kunder där det ställs höga krav på kompetens och förmåga att driva arbetet framåt, du kommer att ansvara för nya och befintliga kunder och marknader. Läs mer om tjänsten.

UI Designer
Bool behöver förstärka sin grafiska avdelning med en UI Designer för arbetet med våra portalleveranser. Vi letar efter en formsäker UI designer som inte nöjer sig med annat än pixelperfektion. Har du dessutom kunskap inom HTML5 och CSS är detta meriterande. Läs mer om tjänsten.

Copy to SharePoint root from Sublime Text

Note, this is intended for your local development only, not a production environment!

At the moment I’m doing lots and lots of JavaScript for SharePoint, which means this:

  1. Write some JavaScript
  2. Use a Visual Studio plugin to copy to SharePoint root (usually Fishbone’s tool)
  3. Reload page (and by that I mean wait for a long, long time for the page to reload)

I’m doing my development in a virtual machine, with limited resources and Visual Studio seems to be hogging most of them, leaving next to nothing to the SharePoint server.

And I also like working in Sublime Text, I’m just so much more proficient in it.

Solution: Do it all i Sublime!

Here’s what we did: A shortcut to copying a file to the SharePoint hive using the Sublime build system.

1. Create a Sublime build file

In Sublime, go to Tools –> Build System –> New Build System

This creates you a file that looks like this:

Save that, name it to what you want your build system to be called (.sublime-bild as file ending). In it we will call on a powershell script. I saved it in the default location:


2. Creating a Powershell script to copy the file

Powershell will simply just do a Copy-Item. The file that you build with our custom build system will be copied from its current location to the hive. It looks like this:

This script takes one parameter: the location of the file that you are calling ”build” on. In order to put it in the correct location in the hive, it checks the folder hierarchy relative to the ”Layouts”-folder. This means that you have to have the file you’re working on in a path that contains a folder named ”Layouts”.

For example, my JavaScript file is located here:

This means that it will end up in the SharePoint hive here:

Save the script somewhere, and name it CopyToSharePointRoot.ps1

3. Using the Powershell script from the build file

We will now change the build-file to make it use the Powershell script with the correct parameter. Change the file you created in the first step to look like this:

In this, change ”exact-location-to-your-ps1-script” to the location of your CopyToSharePointRoot.ps1-file. Remember to have double \ for folders. The $file in the last row is a magic parameter given to the build file by Sublime, which we pass on to our script.

4. Using the build system

Got to Tools – Build –> Choose your new build system

If it’s not there, go back to step one and make sure you have the correct location and file ending.

Now open your file that you wish to copy to the hive, change it, hit save and the ctr + b. This should execute the script, and something like this should come up in your Sublime terminal:

 5. Wow, this would be so awesome as a Sublime package!

Fear not, we’re on it!

How to create a webapp in 15 minutes

If you came to this post because we met at the Geek Girl Meetup, I’m so, so glad to see you. My goal was to inspire at least one person to actually try this out and get started with creating webapps by using Yeoman. It would make me feel really warm inside that I actually inspired someone to get started and try it out.

If you just stumbled in here by yourself, this is a post where I list the few and wonderously simple steps to generate a webapp to use for web development using Yeoman.

The steps

Install nodejs

Go to nodejs.org to download Node. Install it on your computer.

Test Node Package manager

Open your terminal (if you’re on a Mac), or your Power Shell if you’re on a Windows. Don’t know how to do this? Don’t worry, here is a great guide for Mac, and here is a great guide for Windows. You don’t need to know more than how to open it, and think of how cool you’ll look now!

With it open, type in

Press enter. That’s it. You get a response that says stuff about how npm works. Moving on to the next step!

Install Yeoman

Yeoman is a program that helps you generate skeletons for your future web page or web application. Install it by typing this into your terminal/Power Shell:

This installs Yeoman on your computer (the -g part makes sure it’s installed everwhere). If you want to know more about how Yeoman works, this is a good place to start.

Install Bower

Bower helps you out with dependencies such as jQuery or Bootstrap or something else. Install it by typing:

Interested in what you can do with Bower, visit this guide.

Install Grunt

Grunt is what you call a “task runner”. It does tasks for you, like minifying CSS and JavaScript, or compiling Sass, or copying files from one place to another. Let’s install it by typing:

If you want more about what Grunt can do for you, go this guide, which explains it nicely.

Install Webapp generator

Now we’re at the last installation step, which is to install one of Yeomans’ generators, namely Webapp. It’s a generator that creates a bunch of files and folders containing all you need for your future project. Type

Webapp is the most general generator from Yeoman, but there are a bunch of others.

Create project folder

Now it’s time to create a folder where your project will live. Either create it in finder/explorer, or look cool by doing it in your teminal/Power Shell:

Then you have to move your terminal/Poweer Shell to your new folder. This is done by the command cd which stands for ‘change directory’. Type in:

Generate your project

Now the time has come for a project to be created, finally! And all you have to do is type:

And after you pressed enter all the files and folders and content will be created, it’s almost like magic.

Start up your web application in the browser

Once it’s finished, type

This starts up the task manager Grunt, which opens your browser, with the web site on it.

Then what?

So that’s all you need to do, now you can start creating. That’s not always easy, but it’s loads more fun than writing boring HTML and creating folders and so on, which all these steps have done for you.

I made the Counting Down site by using a generator from Yeoman. You can add some JavaScript to the generated JavaScript file to create something that tells time, or just says hello, or shows flash cards from your anatomy class at school, or something entirely different.

It would make me happy if you mailed me at stinaqv@gmail.com with questions, tales or thoughts about this. I hope that you try it out and see where it takes you.

Trying to prepare myself for delivering a talk

I’m starting to get slightly nervous now. Decided that I was going to hold a talk at Geek Girl Meetup Oresund and now I have to do it. Since I seems to be unable to hold lectures and lessons without knowing monumentally more than what I’m actually going to talk about, I have quite a lot of work to do.

I have named the talk “How to go from idea to webapp in 15 minutes”, or something like it, and it is about how to set up grunt, SASS, and JavaScript structure in under 20 minutes. And also, the will be pictures of kittens, probably.

I hope someone shows up and I hope I do great and that the kittens are cute.