This was a triumph.
I'm making a note here: HUGE SUCCESS.

Search This Blog

Showing posts with label Blog related. Show all posts
Showing posts with label Blog related. Show all posts

Monday, November 3, 2014

IT'S OVER NINE THOUSAAAAAAAAAAND!!!!

Actually, it's already over ten thousand by now, but I just couldn't let a title like that slip away! :D

It has been quite a while since I made a new post. Fear not, I will post something SharePoint-related soon. My work has the priority here, but if I can find some spare time then I will continue writing on the new post. Sneak peek: calendar overlays combined with checkboxes!

Let's give you guys a short update about my project, to inform you about what it is exactly that I'm so busy with.
Currently, I'm mainly creating and improving workflows using Nintex. Also in general I'm improving some of my scripts and the CSS of my project, along with some extra's to make it more user friendly. Most of my work goes to those workflows, I need to test them over and over again to make sure there is absolutely no error at all, since it is my intention to make them work properly from the start and then never have to change them again (unless there are major changes required). And other than that, I'm now also learing VBA.

Hopefully I'll be able to finish these workflows soon and when I have some spare time left I'll come back to entertain you all with a new post. Stay tuned!

Tuesday, January 28, 2014

IT'S OVER ONE THOUSAAAAAAAAAAND!!!!

My blog just got over one thousand views!!! 

 

Hurray!!! 

 

Confetti for everyone!!!

 

I probably just viewed my own blog so many times that I'm now up to one thousand. Although I did set it so that my own views wouldn't count. But meh, /care, one thousand views!

Also, someone actually clicked on the advertisement box on the right. Which gave me a very tiny small amount of eurocents, but still money nonetheless!
So if you happen to stumble upon this post, could you like... Just... Do a tiny click on that advertisement box on your right? Yeah. That one, right underneath the "Subscribe to" thingy. It won't cost you a thing, it won't do any harm either, but it will give me a (once again) very tiny small amount of money, which in return makes me a very tiny bit more happier each time someone clicks it.

And who knows, it might even be interesting! I have no idea what the advertisement box tells you, it is supposed to show you advertisements that are relevant to whatever business you searched for on Google. In my case it shows me something in French about becoming a florist, although I have absolutely no idea why it would show something like that since I never even searched for flowers online. Peculiar.


I think I'll keep making posts like these every time my views increase by a thousand. Eventually, I'll get to 9000. And you should know what that means. Oh boy, do I look forward to that moment... That will be one heck of a post.

Friday, January 24, 2014

My new favourite syntax highlighter: Prism!

The past few days, I noticed some parts of my code were missing in the Syntax Highlighter and that sometimes, the code wasn't shown in the highlighter at all (it was just dull text). When I edited the affected blog posts however, the missing pieces of code were there and so were the elements for the highlighter. So I figured it might have had to do something with the Syntax Highlighter.

I decided to search for a new highlighter, and came across Prism. This is a very neat highlighter, it is lightweight and extensible, offers six different styles, has various plugins and is supported by most browsers.
For my blog, I'm using the Prism highlighter with the Okaidia theme and I also included the Line Numbers plugin. 

How to use Prism on Blogger/Blogspot

First of all, I discovered that I couldn't host JavaScript files on Blogger/Blogspot. Secondly, I didn't like the idea of hosting scripts elsewhere. I tried hosting it on Google Drive and that sort of worked, but still I wanted to find an easier way.
So I checked the source of prismjs.com and its pages, searched for the scripts and found them there. Not quite sure if I'm allowed to do that... But it was easier for me and I think those will always be the most up-to-date scripts. 
This is the core JavaScript code of Prism. 
This is the JavaScript code for the line numbers plugin.
This is the CSS code for the line numbers plugin.
And this is the CSS code for the Okaidia theme.

I'm not going to provide the link to all the scripts, plugins and themes for Prism since you can probably find most of them yourself by changing the URLs a bit or by doing a search through the source code of the site. 

Now that we have the necessary files, we need to include them to the template. 
To add them, you need to edit the HTML of your template. You can do so by going to the settings of your blog, select "Template" from the left hand side navigation, and then choose "Edit HTML". 

Right before the </head> tag, you paste the following code (source of the scripts may be different depending on which plugins or styles you use):
<script src='http://prismjs.com/prism.js' type='text/javascript'/>
<script src='http://prismjs.com/plugins/line-numbers/prism-line-numbers.js' 
type='text/javascript'/>
<link 
href='http://prismjs.com/themes/prism-okaidia.css' rel='stylesheet'/>
<link 
href='http://prismjs.com/plugins/line-numbers/prism-line-numbers.css' 
rel='stylesheet'/>

Now, when you create a new blog post and you wish to add code to it, you can use the following to highlight your code:
<pre class="line-numbers"><code class="language-javascript">
// Your code here.
</code></pre>

Do note that depending on which plugins you have, you can change the class in the pre tag. You can read more about the different plugins and how to use them here. Also, depending on what kind of code you will be highlighting, you can change the class in the code tag.
To highlight CSS, use language-css class for the code tag.
To highlight HTML, use language-markup class for the code tag.
To highlight JavaScript, use language-javascript class for the code tag.

Got code that's not showing up? No problem. We can fix this. 

I noticed that if you want to use HTML code inside JavaScript (or even script tags in JavaScript), the code will likely not show. I think this might be related to HTML being stripped off. For example, see the following code:
var site = "www.prismjs.com";
var title = "PrismJS";
var text = "" + title + "";

Noticed anything strange? I surely did. I added an anchor tag to that code, yet it is not showing.
Let me show you the same code, but now I changed the "less than" character ("<") with "&lt;" and this is the result:
var site = "www.prismjs.com";
var title = "PrismJS";
var text = "<a href='" + site + "'>" + title + "</a>";

Bam! Suddenly the code works. Just to give you an idea, this is how it looks like (and how I write it in order for it to show up properly) when I edit the blog post with the code:
var site = "www.prismjs.com";
var title = "PrismJS";
var text = "&lt;a href='" + site + "'>" + title + "&lt;/a>";

So when you use HTML inside JavaScript, or even when you use "<script></script>" tags or regular expressions, always make sure to replace the "less than" character with "<". That way, no code will be missing from the highlighter and visitors will be able to correctly copy and use your code.

All done! Let's start making more blog posts now!

Now that I finally have a syntax highlighter that does what I want it to do, I can continue writing blog posts about my SharePoint experiences without having to worry about visitors not seeing my code. ^_^

I would like to thank Lea Verou and all these people who created Prism, without them I would probably still struggle with highlighting stuff. Please do check out Prism, I highly recommend it for Blogger/Blogspot or any other site.

Tuesday, October 22, 2013

Trying to take over the world... One post at a time.

My boyfriend told me I should have a blog. To post about all the little things I do that make me happy. Creative things, crafts. I'm also just going to put some handy SharePoint posts here, since I often have the feeling that some of the things I code might actually come in handy for other people. So yeah. :)

Perhaps a small introduction is in place!

My name is Magali. Yes, I am female.
I'm a junior analyst programmer and I work at the college university of Ghent, where I also graduated as bachelor in Applied Computer Science in 2012.
My job is to make a new kind of intranet site in SharePoint 2013. At first I didn't even know how to work with SharePoint since I only had a few workshops during my education, but I was given the opportunity to learn more about SharePoint and to study it in order to properly do my job. And here I am now, actually enjoying SharePoint. I still like to code in JavaScript though, so I often use JavaScript to make things work.

Other than that, I also have a wide arrange of hobbies. 

I'm often told that I have too many, but I enjoy them all. Variation, yay! Here's what I like to do:
  • play the piano
  • watch series and movies
  • go to the movies
  • play video games (both on computer and consoles)
  • make things with perler beads in 8-bit style
  • sew hand-made felt plushies
  • craft things out of cardboard (mostly miniature furniture)
  • collecting Pokémon games
  • going for a swim
  • dozens of other things 

Also, I'm geeky

Indeed I am! A geeky girl. To me, being geeky means that I'm passionate about something. Not only about computer business and gaming, but also about hobbies like crafting. I do tend to sometimes mix the two (like making 8-bit Space Invaders, you just wait until that project is finished and you will be amazed!).

Anyway, please do enjoy my blog. Expect lots of coding, crafting, geeky creativity and cat pictures!


- Magali


PS: The cake IS a lie. No, seriously, did you see that recipe?