Skip to content

Instantly share code, notes, and snippets.

@ctaggart
ctaggart / create_source.rs
Last active March 28, 2024 16:34
Creating and Printing a TypeScript AST from Rust
#![allow(non_snake_case)]
#![allow(dead_code)]
// port of:
// Creating and Printing a TypeScript AST
// https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#creating-and-printing-a-typescript-ast
extern crate typescript_ts as ts;
extern crate chakracore;
use chakracore::context::ContextGuard;
@ctaggart
ctaggart / octave_mkoctfile_build.txt
Created June 4, 2017 13:40
2017-06-04 octh building errors
GNU ld (GNU Binutils) 2.25.1
Supported emulations:
i386pep
i386pe
using internal linker script:
==================================================
/* Default linker script, for normal executables */
/* Copyright (C) 2014 Free Software Foundation, Inc.
Copying and distribution of this script, with or without modification,
are permitted in any medium without royalty provided the copyright
@ctaggart
ctaggart / failing rust build.txt
Last active May 24, 2017 10:34
2017-05-24 octh_helloworld build errors
cargo : Compiling octh_helloworld v0.1.0 (file:///C:/Users/camer/rs/octh_helloworld)
At line:1 char:1
+ cargo build 2>&1 > build.txt
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: ( Compiling oc...cth_helloworld):String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
error
: linking with `C:/Octave/Octave-4.2.1/bin/gcc.exe` failed: exit code: 1
|
# run this in PowerShell as Administrator
# it will launch Visual Studio Installer and prompt you to add
# all artifacts required to build Visual F#
if (-not (Get-Module -ListAvailable -Name VSSetup)) {
Install-Module VSSetup -Scope CurrentUser
}
$vs = Get-VSSetupInstance
& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installershell.exe" modify `
@ctaggart
ctaggart / Create-SourceLink.ps1
Created March 26, 2017 14:38
The filename or extension is too long
@ctaggart
ctaggart / project.json
Created March 2, 2017 04:11
Azure Functions, why no binding redirects?!
{
"frameworks": {
"net46": {
"dependencies": {
"Argu": "3.7",
"FSharp.Configuration": "0.6.4",
"FSharp.Data": "2.3.2",
"FSharp.Data.SqlClient": "1.8.2",
"Google.Cloud.Logging.Log4Net": "1.0.0-beta08",
"Microsoft.SqlServer.Types": "11.0.2",
@ctaggart
ctaggart / lineendings.ps1
Created February 28, 2017 04:57
test git line endings
git config --global --unset core.autocrlf
git config --system --unset core.autocrlf
git config --global --unset core.eol
git config --system --unset core.eol
git clone $repo test
git clone -c core.autocrlf=false $repo testAutocrlfFalse
git clone -c core.autocrlf=false -c core.eol=crlf $repo testAutocrlfFalseEolCrlf
git clone -c core.autocrlf=false -c core.eol=lf $repo testAutocrlfFalseEolLf
git clone -c core.autocrlf=input $repo testAutocrlfInput
@ctaggart
ctaggart / install.sh
Last active December 16, 2016 03:03
Fetch from Browsers using Mocha & System.js
#!/bin/sh -e
npm install --save-dev typescript
npm install --save-dev http-server
# browser
npm install --save whatwg-fetch
npm install --save-dev @types/whatwg-fetch
npm install --save es6-promise
npm install --save systemjs
npm install --save-dev @types/systemjs
interface FreeGeoIP {
ip: string;
country_code: string;
country_name: string;
region_code: string;
region_name: string;
city: string;
zip_code: string;
time_zone: string;
latitude: number;
@ctaggart
ctaggart / FreeGeoIP.d.ts
Created December 12, 2016 01:04
TypeScript Testing of jQuery Ajax from Node.js
interface FreeGeoIP {
ip: string;
country_code: string;
country_name: string;
region_code: string;
region_name: string;
city: string;
zip_code: string;
time_zone: string;
latitude: number;