Skip to content

Instantly share code, notes, and snippets.

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

Richard Astbury richorama

💭
:octocat: 👾 🔥 ☁️
View GitHub Profile

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.
@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 / 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 / wpf.js
Last active January 4, 2018 17:54
Display a WPF Window from node.js using edge.js
var edge = require('edge');
var hello = edge.func(function () {/*
#r "PresentationCore.dll"
#r "PresentationFramework.dll"
#r "WindowsBase.dll"
#r "System.Xaml.dll"
#r "System.Threading.dll"
@richorama
richorama / index.html
Last active July 26, 2017 09:18
Programmatically determine your nearest Windows Azure Data Centre
<html>
<head>
<script>
var locations = {
"speedtestwe": "West Europe",
"speedtestsea" : "Southeast Asia",
"speedtestea": "East Asia",
"speedtestnsus": "North Central US",
"speedtestne": "North Europe",
"speedtestscus": "South Central US",
@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 / Azure Data Centers.geojson
Last active February 12, 2017 12:17
Azure Data Center Locations
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@richorama
richorama / talk.md
Created February 28, 2014 17:29
Nodejs + LevelDB Talk

Intro into level db

https://code.google.com/p/leveldb/

  • It's a database, it's by google, and is what supports IndexDB in the chrome browser
  • It's also been used to store data in riak
  • It lives in your process (a bit like sqlite)
  • Inspired by Big Table, but designed to work on mobile devices
  • There is great support for leveldb in the node.js
  • Node is a great tool for sticking technologies together
@richorama
richorama / package.json
Last active April 8, 2016 14:35
A github service hook to start a VM, and shut it down after 15 minutes of inactivity
{
"name": "vmstartstop",
"version": "0.0.0",
"description": "",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"author": "",
@richorama
richorama / Program.cs
Last active January 4, 2016 14:59
Very simple benchmark to see whether its better to compile .NET for x64 for x86 (x86 is faster)
/*
Very simple benchmark to see whether its better to compile .NET for x64 for x86
Results on my Lenovo X1 Core i5 pro running on high performance mode
Compiled for release x64
999ms
1017ms
1031ms