This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.IO | |
open System.Text | |
let fromEntity(s: string) = | |
s.Replace("<", "<"). | |
Replace(">", ">"). | |
Replace(""", "\""). | |
Replace(" ", " "). | |
Replace("&", "&") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#nowarn "9" | |
open System | |
open System.IO | |
open System.Runtime.InteropServices | |
[<StructLayout(LayoutKind.Sequential)>] | |
type Test = struct | |
val mutable Foo:int | |
val mutable Bar:uint16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "System" | |
#r "System.Windows.Forms" | |
open System | |
open System.Windows.Forms | |
[<EntryPoint; STAThread>] do | |
let w = new Form(AllowDrop = true) | |
Application.Run w |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is in the public domain. | |
#r "System" | |
#r "System.Xaml" | |
#r "PresentationCore" | |
#r "PresentationFramework" | |
#r "WindowsBase" | |
open System | |
open System.IO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
komodo.assertMacroVersion(3); | |
if (komodo.view) komodo.view.setFocus(); | |
ko.commands.doCommand('cmd_save'); | |
ko.run.runEncodedCommand(window, '%(python) \"%F\" {\'cwd\': u\'%D\'}'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
++++++[>-[>-[>-[-]<-]<-]<-] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ++++++[>++++++<-]+[>.>,.<<] | |
var mem = new Uint8Array(30000); | |
var reg = 0; | |
var pc = []; | |
var buf = ""; | |
function putchar() { | |
process.stdout.write(String.fromCharCode(mem[reg])); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE CPP, TemplateHaskell #-} | |
----------------------------------------------------------------------------- | |
-- | |
-- Module : Main | |
-- Copyright : | |
-- License : Public Domain | |
-- | |
-- Maintainer : | |
-- Stability : | |
-- Portability : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ref = require("ref"); | |
var ffi = require("ffi"); | |
var libc = ffi.Library("libc", { | |
"mmap": ["pointer", ["pointer", "size_t", "int", "int", "int", "int64"]], | |
"munmap": ["int", ["pointer", "size_t"]], | |
}); | |
var PROT_READ = 1; | |
var PROT_WRITE = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System.IO | |
for i in 0..0xff do | |
let dir1 = sprintf "%02x" i | |
if not <| Directory.Exists dir1 then | |
ignore <| Directory.CreateDirectory dir1 | |
for j in 0..0xff do | |
let path = Path.Combine(dir1, sprintf "%02x.bin" j) | |
printfn "%s" path | |
let b = (i <<< 24) ||| (j <<< 16) |