Skip to content

Instantly share code, notes, and snippets.

View csvan's full-sized avatar

Christopher Svanefalk csvan

View GitHub Profile
@csvan
csvan / gulsunde-trial
Created July 8, 2014 19:54
Brief demo
/**
* Created by christopher on 08/07/14.
*/
//Necessary imports
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@csvan
csvan / JSONClient
Last active August 29, 2015 14:16
Xamarin.Forms JSON client
namespace JSONClientExample
{
public class JSONClient
{
readonly string baseUrl;
readonly HttpClient client;
public JSONClient (string baseUrl)
{
@csvan
csvan / gist:48ca3949c9ce25769731
Created October 27, 2015 09:21
Dynamic instantiation of AngularJS directives.
.directive('dynamicDirective', function ($compile) {
return {
restrict: 'E',
replace: true,
scope: {
directiveName: '@',
directiveParams: '='
},
link: function ($scope, $element, $attr) {
// Dynamically construct the directive