Skip to content

Instantly share code, notes, and snippets.

@crilleengvall
crilleengvall / googlemap.html
Created February 15, 2012 12:53
Adding markers to google map...
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps JavaScript API v3 Example: Simple Icons</title>
<link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
function initialize()
@crilleengvall
crilleengvall / relatePlusSV.xml
Created April 18, 2012 11:54
Episerver Relate Demo site translation in swedish
<?xml version="1.0" encoding="utf-8"?>
<languages>
<language name="Swedish" id="sv">
<pagetitles>
<images>bilder</images>
<imagegalleries>bildgalleri</imagegalleries>
<myblog>blog</myblog>
<myfriends>vänner</myfriends>
<mypage>sida</mypage>
</pagetitles>
@crilleengvall
crilleengvall / embed-gist.php
Created June 24, 2012 11:46 — forked from roborourke/embed-gist.php
Adds autoembedding of gist urls in WordPress
<?php
/**
* Usage:
* Paste a gist link into a blog post or page and it will be embedded eg:
* https://gist.github.com/2926827
*
* If a gist has multiple files you can select one using a url in the following format:
* https://gist.github.com/2926827?file=embed-gist.php
*/
@crilleengvall
crilleengvall / after
Created July 26, 2012 09:07
#import directives
#import "DevicesViewController.h"
#import "FSVerticalTabBarController.h"
#import "SensorsViewController.h"
#import <Foundation/Foundation.h>
@crilleengvall
crilleengvall / gist:3697074
Created September 11, 2012 09:03
Check if page in episerver is opened in editmode/adminmode
private bool IsOpenedInEditMode()
{
bool isInEditMode = false;
If(HttpContext.Current.Request.UrlReferrer != null)
{
isInEditMode = Regex.IsMatch(HttpContext.Current.Request.UrlReferrer.LocalPath, "/admin/|/edit/", RegexOptions.IgnoreCase);
}
return isInEditMode;
}
@crilleengvall
crilleengvall / CacheExample.cs
Created September 16, 2012 19:43
A wrapper around HttpRuntime.Cache
string simpleString = "this string will be cached";
HttpRuntimeCache cache = new HttpRuntimeCache();
cache.Add("simpleString", simpleString);
string fromCache = cache.Get("simpleString") as string;
cache.Remove("simpleString");
@crilleengvall
crilleengvall / createhotfixbranch
Created November 15, 2012 22:01
Git commands....
$ git checkout -b hotfix-1.2.1 master
Switched to a new branch "hotfix-1.2.1"
$ ./bump-version.sh 1.2.1
Files modified successfully, version bumped to 1.2.1.
$ git commit -a -m "Bumped version number to 1.2.1"
[hotfix-1.2.1 41e61bb] Bumped version number to 1.2.1
1 files changed, 1 insertions(+), 1 deletions(-)
@crilleengvall
crilleengvall / index.html
Created January 8, 2013 13:51
Hello world for static:html iframe tabs for facebook
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="sv">
<head>
<title>Something</title>
[[style.css]]
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<div class="crappyredtext">Hello world!</div>
@crilleengvall
crilleengvall / boxfile-example
Last active December 14, 2015 17:09
Boxfile example
web1:
################################################
## GENERAL SETTINGS
################################################
shared_writable_dirs:
- app/cache
- app/logs
################################################
## WEB SPECIFIC SETTINGS
@crilleengvall
crilleengvall / gemfile
Last active December 15, 2015 20:59
Updating ruby version
ruby '1.9.3'