Skip to content

Instantly share code, notes, and snippets.

View richorama's full-sized avatar
💭
:octocat: 👾 🔥 ☁️

Richard Astbury richorama

💭
:octocat: 👾 🔥 ☁️
View GitHub Profile
@richorama
richorama / FitsFile.cs
Created November 1, 2018 00:34
KeplerNet
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Drawing;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.PixelFormats;
@richorama
richorama / create models.sql
Last active November 6, 2018 19:35
Sql script to create C# classes from a database schema
declare @Result varchar(max)
declare @TableName varchar(256)
DECLARE table_cursor CURSOR
FOR Select name from sysobjects where xtype = 'U' -- or 'V'
OPEN table_cursor
FETCH NEXT FROM table_cursor
INTO @TableName
@richorama
richorama / Microsoft.PowerShell_profile.ps1
Last active March 17, 2017 15:25
Microsoft.PowerShell_profile.ps1
#requires -Module @{ModuleName="PSGit"; ModuleVersion="2.0.4"}, @{ModuleName="PowerLine"; ModuleVersion="2.0.0"}
using module PowerLine
using namespace PowerLine
$PowerLinePrompt = 1,
(
$null, # No left-aligned content on this line
@(
@{ text = { New-PowerLineBlock (Get-Elapsed) -ErrorBackgroundColor DarkRed -ErrorForegroundColor White -ForegroundColor Black -BackgroundColor DarkGray } }
@{ bg = "Gray"; fg = "Black"; text = { Get-Date -f "T" } }
@richorama
richorama / win10problems.md
Created May 14, 2015 09:08
Problems with Windows 10 build 10074
  1. It's very hard to see what application are open/closed. Perhaps this is my colour scheme (dark grey) but the small dark bar at the bottom of the task bar is hard to see.
  2. Left clicking on an icon in the task bar frequently results in the popup menu appearing (as if I'd right clicked). This is seriously annoying.
  3. The notifications pane is now missing the 'clear all' button. I have to clear the notifications out by their grouping.
  4. The buttons at the bottom of the notification are a confusing. There are too many. The 'tablet mode' button looks activated, but it isn't.
  5. The start menu has failed to disappear, requiring a restart.
### Keybase proof
I hereby claim:
* I am richorama on github.
* I am richorama (https://keybase.io/richorama) on keybase.
* I have a public key whose fingerprint is 3F9F 7D8D BD9A 3F05 D15D 3ECA E2BE 296E 5F49 7418
To claim this, I am signing this object:
@richorama
richorama / Preferences.sublime-settings
Created December 17, 2014 15:10
sublime text preferences
{
"auto_match_enabled": false,
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"font_options":
[
],
"font_size": 15,
"gutter": false,
"ignored_packages":
[
@richorama
richorama / install julia.md
Created December 11, 2014 12:21
Install Julia from a package manager

On Ubuntu

sudo add-apt-repository ppa:staticfloat/juliareleases
sudo apt-get update
sudo apt-get install julia

On Windows

@richorama
richorama / .md
Last active August 29, 2015 14:11
Julia on Azure Websites

Warning: This is a complete hack

screenshot

TL;DR

A node process hosts the julia server, and passes the name of the named pipe to it as an argument.

Some Background on IISNode

@richorama
richorama / Julia.md
Last active August 29, 2015 14:09
Some things I like about Julia do far

The Good

HTTP

Starting an HTTP server looks a lot like node:

using Morsel

app = Morsel.app()

My comment on http://www.nomorejavascript.com/ was deleted. So much for a fair and balanced discussion.

I think the idea is noble, but the people behind the idea are clearly inept.

One big reason JavaScript will be hard to replace is that it's been through years of battle testing and it's security holes have mostly been patched. You would have to start this process from scratch with a new language, which in itself is a good reason not to bother.

Here are my comments in reponse to their arguments for a new language:

  1. Camel casing is not a language feature. You can use underscores in your variable names if you want.
  2. node.js is not a library, it's a JavaScript runtime.