Skip to content

Instantly share code, notes, and snippets.

View clarkezone's full-sized avatar

James Clarke clarkezone

View GitHub Profile
using Microsoft.Graphics.Canvas;
using Microsoft.Graphics.Canvas.DirectX;
using Microsoft.Graphics.Canvas.Text;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.Foundation;
@clarkezone
clarkezone / test.csx
Created August 17, 2016 06:41
Images in continuous
using UIKit;
using Foundation;
var Main = getTestImage();
UIImage getTestImage(){
using (var url = new NSUrl("http://www.bringcast.com/images/themes.png")){
using (var data = NSData.FromUrl(url)){
return UIImage.LoadFromData(data);
}
@clarkezone
clarkezone / gist:52c097e8b9f8d6d53b7b2282010570ea
Last active August 18, 2016 00:07
Clarkezone's dev box install script
Set-FileExplorerOptions -showFileExtensions
cinst vim
cinst poshgit
cinst ngrok.portable
cinst visualstudiocode
cinst slack
mkdir $home\Source\Repos
mkdir $home\Source\Repos\Clarkezone
@clarkezone
clarkezone / mainpage.xaml.cs
Created August 19, 2016 17:00
Use composition layer and win2d to render an image at load time on a background thread and implicitly fade in when rendered
using Microsoft.Graphics.Canvas.UI.Composition;
using Robmikh.Util.CompositionImageLoader;
using System;
using System.Numerics;
using System.Threading;
using System.Threading.Tasks;
using Windows.Foundation;
using Windows.UI;
using Windows.UI.Composition;
using Windows.UI.Xaml;
curl -o ~/.vim/vimrc --create-dirs https://gist.githubusercontent.com/clarkezone/47bf48053787f4fd178aa85be02f7100/raw/eb73b8c8cc46c0237372f5f4b75f75de3e802f9e/vimrc
curl -o ~/.vim/colors/molokai.vim --create-dirs https://raw.githubusercontent.com/fatih/molokai/master/colors/molokai.vim
curl -o ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
curl -LSso ~/.vim/autoload/pathogen.vim --create-dirs https://tpo.pe/pathogen.vim
git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree
git clone https://github.com/fatih/vim-go.git ~/.vim/bundle/vim-go
git clone https://github.com/majutsushi/tagbar.git ~/.vim/bundle/tagbar
git config --global core.editor "vim"
@clarkezone
clarkezone / vimrc
Last active October 29, 2016 15:09
execute pathogen#infect()
set gfn=Consolas:h12:cANSI
set ignorecase
set number
set ruler
set autowrite
set incsearch
color molokai
let g:go_highlight_types = 1
let g:go_highlight_fields = 1
@clarkezone
clarkezone / install-gcm.sh
Last active March 14, 2017 01:13
Install GCM under WSL
sudo apt-get update
sudo apt-get install default-jre
sudo curl -L -o /usr/local/bin https://github.com/Microsoft/Git-Credential-Manager-for-Mac-and-Linux/releases/download/git-credential-manager-1.7.1/git-credential-manager-1.7.1.jar
java -jar /usr/local/bin/git-credential-manager-2.0.2.jar install
@clarkezone
clarkezone / index.html
Last active May 11, 2018 03:48
Fluent Design talks from Build 2018
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<title>Fluent Design Talks at Build 2018</title>
<body>
<H1>BUILD 2018 Fluent Design Talks</H1>
<p>Visit <a href="https://fluent.microsoft.com/">https://fluent.microsoft.com</a> for more info</p>
<a href="https://medius.studios.ms/Embed/Video/BRK3501?sid=BRK3501">Modernizing Desktop Apps on Windows 10, Mike Harsh</a><br/>
<a href="https://developer.microsoft.com/en-us/events/build/content/whats-new-for-windows-ux-developers">What's New for Windows UX Developers? Fluent and XAML, Paul Gusmorino</a><br/>
@clarkezone
clarkezone / RoHelper.cpp
Created September 17, 2018 02:28
Dynamically using WinRT avoiding statically linking windowsapp.lib and thus breaking compatibility with win7
class RoHelper
{
public:
RoHelper() : mWinRtAvailable(false)
{
if (!IsWindows10OrGreater())
{
return;
}
import 'dart:async';
import 'dart:io';
import 'package:http_server/http_server.dart';
void main() {
var webFiles = new VirtualDirectory('web');
runZoned(() {
HttpServer.bind('0.0.0.0', 8080).then((server) {