Skip to content

Instantly share code, notes, and snippets.

View jmyrland's full-sized avatar

Jørn A. Myrland jmyrland

View GitHub Profile
@jmyrland
jmyrland / ZigZag-edges.markdown
Created March 13, 2014 12:15
A Pen by Jørn A. Myrland.
@jmyrland
jmyrland / Falling-squares.markdown
Created March 13, 2014 13:02
A Pen by Jørn A. Myrland.
@jmyrland
jmyrland / nodejs.spec
Created July 19, 2012 12:23 — forked from splaice/nodejs.spec
RPM spec file for node
%define ver 0.8.2
%define rel 1
%define jobs 2
Name: nodejs
Version: %{ver}
Release: %{rel}
Summary: Node's goal is to provide an easy way to build scalable network programs.
Group: Applications/Internet
License: Copyright Joyent, Inc. and other Node contributors.
@jmyrland
jmyrland / ex.js
Last active December 11, 2015 18:09
socket.io xhr-polling test.
var i = 0,
io = require('socket.io'),
http = require('http');
var server = http.createServer().listen(80);
io = io.listen(server);
io.set('transports', [ 'xhr-polling' ]);
io.sockets.on('connection', function(socket){
@jmyrland
jmyrland / DetailedOutput.txt
Last active December 14, 2015 21:19
C# Console App for getting vimeo tokens. Based on VimeoDotNet.
This software uses VimeoDotNet to connect to Vimeo API. To support this project visit http://support.saeedoo.com.
ExecuteGetCommand: GET: http://vimeo.com/oauth/request_token?oauth_callback=oob&oauth_consumer_key=6a0863a7e1a977e0a11b7b1d44e4fd4fe2b099ee&oauth_nonce=12538763498766544664049620&oauth_signature=m97UWvPR%2fkHifaKh%2bLcUv1mio%2bM%3d&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1363166144&oauth_version=1.0&
ExecuteGetCommand: OK: http://vimeo.com/oauth/request_token?oauth_callback=oob&oauth_consumer_key=6a0863a7e1a977e0a11b7b1d44e4fd4fe2b099ee&oauth_nonce=12538763498766544664049620&oauth_signature=m97UWvPR%2fkHifaKh%2bLcUv1mio%2bM%3d&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1363166144&oauth_version=1.0&
[134B]: oauth_token=f5e46105426e91e42f3fb094e6301451&oauth_token_secret=594c8309381581eda2a1da71aa1cead935d1eaaf&oauth_callback_confirmed=true
The thread '<No Name>' (0x1b44) has exited with code 0 (0x0).
The thread '<No Name>' (0x14cc) has exited with code 0 (0x0).
ExecuteGetCommand: GET
@jmyrland
jmyrland / .readme.md
Last active December 16, 2015 16:08
Episerver 7 - Dynamic page for vomiting all dynamic data store objects

Episerver 7 - Dynamic page for vomiting all dynamic data store objects

Provides functionality for:

  • Exporting dynamic data stores to excel
  • Deleting single dynamic data store objects.

Set the stores you want to list in the stores, for example:

protected static List<object> stores = new List<object>()

{

/**
* Related to http://stackoverflow.com/questions/16528539/mongoose-query-for-an-array-of-dictionaries
*/
var mongoose = require('mongoose'),
db = mongoose.connect('mongodb://localhost/test');
var blogSchema = new mongoose.Schema({
group: String,
writing: [{
@jmyrland
jmyrland / notepad.html
Last active December 18, 2015 02:48 — forked from jdkanani/notepad.html
Real-time markdown editor/converter, with basic twitter bootstrap styles.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@jmyrland
jmyrland / snippet.cs
Created June 5, 2013 13:19
SharePoint: is user member of group function.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;
namespace Example