Skip to content

Instantly share code, notes, and snippets.

@echo off
rem Copyright (C): 2001, 2002, 2003, 2004, 2005 Earnie Boyd
rem mailto:[email protected]
rem This file is part of Minimal SYStem
rem http://www.mingw.org/msys.shtml
rem
rem File: msys.bat
rem Revision: 2.4
rem Revision Date: December 8th, 2005
Function Add-WindowsUpdate
{param ($Criteria="IsInstalled=0 and Type='Software'" , [switch]$AutoRestart, [Switch]$ShutdownAfterUpdate)
$resultcode= @{0="Not Started"; 1="In Progress"; 2="Succeeded"; 3="Succeeded With Errors"; 4="Failed" ; 5="Aborted" }
$updateSession = new-object -com "Microsoft.Update.Session"
write-progress -Activity "Updating" -Status "Checking available updates"
$updates=$updateSession.CreateupdateSearcher().Search($criteria).Updates
if ($Updates.Count -eq 0) { "There are no applicable updates."}
else {
$downloader = $updateSession.CreateUpdateDownloader()
$downloader.Updates = $Updates
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam cursus. Morbi ut
mi. Nullam enim leo, egestas id, condimentum at, laoreet mattis, massa. Sed
eleifend nonummy diam. Praesent mauris ante, elementum et, bibendum at, posuere
sit amet, nibh. Duis tincidunt lectus quis dui viverra vestibulum. Suspendisse
vulputate recycle out. Nulla elementum dui ut augue. Aliquam vehicula mi at
mauris. Maecenas placerat, nisl at consequat rhoncus, sem nunc gravida justo,
quis eleifend arcu velit quis lacus. Morbi magna magna, tincidunt a, mattis non,
imperdiet vitae, tellus. Sed odio est, auctor ac, sollicitudin in, consequat
vitae, orci. Fusce id felis. Vivamus sollicitudin metus eget eros.
@Keno
Keno / syncio.jl
Last active December 11, 2015 18:08
listen(8080) do server
client = accept(server)
readline(client)
start_reading(client) do data
println(data)
end
end
@Keno
Keno / mcmscript.jl
Last active December 15, 2015 23:29
using Tk
require("Cairo")
using DataFrames
using Gadfly
using Distributions
using Compose
using Graphs
include("mcm2.jl")
@Keno
Keno / pkg.md
Created May 24, 2013 12:31
Proposal for dealing with external dependencies in the Julia Package Manager

Introduction

The purpose of this Julep[1] is to propose a revised mechanism for dealing with external dependencies in Julia packages in the new revision of the package manager to be included in the Julia 0.2 release.

Please post any comments and suggestions directly on the julia-dev mailing list thread[2] for discussion.

Background

@Keno
Keno / handmade.jl
Created June 4, 2013 19:53
Previous handmade REPL function
function handmande_default(s::ReadlineState)
c=read(s.terminal,Char)
# Need switch-case (though LLVM might be smart enough to optimize this anyway)
if c == '\t'
completeLine(s)
refresh_line(s)
elseif c == '\r'
if s.enter_cb(s)
println(s.terminal)
@Keno
Keno / Stacktrace
Last active December 18, 2015 03:29
jl_method_table_assoc_exact at /Users/keno/Documents/src/julia/usr/bin/../lib/libjulia-debug.dylib: offset 358
typeinf at inference.jl:1268
??? at ???: offset 0
abstract_call_gf at inference.jl:556
abstract_call at inference.jl:606
abstract_eval_call at inference.jl:711
abstract_eval at inference.jl:744
abstract_eval_arg at inference.jl:680
typeinf at inference.jl:1228
??? at ???: offset 0
module MCM
import Base.read, Base.show, Base.ref, Base.+, Base.(/)
export ShapeFile, RGBGradient, LogLinearRGBGradient, LinearRGBGradient
type Rect{T}
top::T
left::T
bottom::T
right::T
@Keno
Keno / out.log
Created August 1, 2013 20:16
Python Valgrind
keno@keno-G73Jh:~/julia$ valgrind --track-origins=yes --suppressions=./valgrind-python.supp usr/bin/julia-debug-readline plt.jl | tee > out2.log
==17778== Memcheck, a memory error detector
==17778== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==17778== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==17778== Command: usr/bin/julia-debug-readline plt.jl
==17778==
==17778== Syscall param msync(start) points to uninitialised byte(s)
==17778== at 0x506B3DD: ??? (syscall-template.S:81)
==17778== by 0x5B93992: msync_validate (in /home/keno/julia/usr/lib/libjulia-debug.so)
==17778== by 0x5B93ABF: validate_mem (in /home/keno/julia/usr/lib/libjulia-debug.so)