Skip to content

Instantly share code, notes, and snippets.

@dander
dander / signtool.msbuild.tasks
Last active September 23, 2015 21:10 — forked from gregmac/signtool.msbuild.tasks
SignTool MSBuild Task
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
Sign .exe files using signtool.exe.
(c) 2014 Greg MacLellan, Licensed under MIT http://opensource.org/licenses/MIT
Features:
* Hides password from being displayed in build output
* Retries against multiple timestamp servers if the server returns an invalid response (fairly common)
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
<title>The Defrag Show (Audio) - Channel 9</title>
<atom:link rel="self" type="application/rss+xml" href="https://channel9.msdn.com/Shows/The-Defrag-Show/feed/mp3"></atom:link>
<itunes:summary>Channel 9&#39;s tech support and troubleshooting show hosted by Larry Larsen and Gov Maharaj. Send your questions to DefragShow@Microsoft.com. </itunes:summary>
<itunes:author>Microsoft</itunes:author>
<itunes:subtitle></itunes:subtitle>
<image>
@dander
dander / parse-crashplan-csv.cs
Created November 10, 2016 07:41
search crashplan manifest (can be run in LINQPad in C# program mode)
void Main()
{
var result = ReadLines(@"D:\temp\crashplan\full-dump3.csv")
// faster initial tests...
// .Skip(1)
// .Take(10)
.Select(l => l.Split(','))
// extract properties of each csv row
.Select(l => new
{
@dander
dander / redLib.linq
Created February 17, 2017 09:10
LINQPad "hello libRed" script
<Query Kind="Program">
<Reference>&lt;RuntimeDirectory&gt;\System.Runtime.InteropServices.dll</Reference>
<Namespace>System.Runtime.InteropServices</Namespace>
</Query>
void Main()
{
redOpen();
redDo("view [text {hello, libRed!}]");
}
@dander
dander / range-generator.red
Created April 26, 2017 06:04
lazy range enumeration
Red [
Title: "range generator attempt (4?)"
]
; @JacobGood's closure func
closure: func [
vars [block!]
spec [block!]
body [block!]
][
@dander
dander / profile.red
Created November 14, 2017 06:21 — forked from greggirwin/profile.red
Basic profiling for Red code comparisons
Red []
e.g.: :comment
delta-time: function [
"Return the time it takes to evaluate a block"
block [block! word! function!] "Block to evaluate"
/count ct "Eval the block this many times, rather than once"
][
ct: any [ct 1]
@dander
dander / Macros.md
Created February 8, 2018 21:18
JacobGood1's macros page

Macros(SPEL:-semantic-programming-enhancement-logic).md First of all, I advocate we call macros SPELs in order to get rid of the confusion when people come from other languages. This will also allow people who want to write tutorials about such a feature to easily(or more easily) google the word SPEL over macro. My recommendation of SPEL is not my own idea it comes from Conrad Barski: http://www.lisperati.com/no_macros.html

Shen, a dialect of lisp, will be what is used for spel examples. I will try to explain the syntax in order for readers of this wiki to be able to absorb the idea of spels. Come to this channel for questions, comments, approvals, disapprovals, or whatever else: https://gitter.im/red/red/lisp

We will begin(and end) by discussing two examples: max and thread.

In Shen, one defines a function at the repl like so...

@dander
dander / Words-and-Bindings.md
Created September 10, 2018 23:41
Attempting to produce a simple / concise explanation of words in Red

What are words?

Words form the grammar of the Red programming language. For people familiar with more mainstream languages, word! replaces keywords, variables, and operators. However, unlike other programming languages where those constructs have fixed definitions hard-wired in the compiler, in Red words are just a basic type of data. This makes the structure of a program extremely flexible.

Parts of a word!

A word! is made of up of 3 basic parts.

  • name - The symbolic representation of the word. It's just the text that you typed to create the word
  • context - This determines the meaning of the word. Just as in spoken language, a word can change its meaning depending on the context. In Red, a context is a mapping of words to their meanings.
@dander
dander / dicewords.red
Created October 2, 2018 05:27
simple GUI app which generates random passphrases from the EFF dice word list
Red [
Title: "Diceword passphrase generator"
Needs: 'View
]
word-list: https://www.eff.org/files/2016/07/18/eff_large_wordlist.txt
words: parse load-thru word-list [collect some [keep word! | skip]]
random/seed now/precise
view [
@dander
dander / solarized.red
Created January 17, 2019 09:27
solarized color palette
Red [
Title: "solarized colors"
Source: https://ethanschoonover.com/solarized
Values: {
SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B sRGB HSB
--------- ------- ---- ------- ----------- ---------- ----------- -----------
base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21
base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26
base01 #586e75 10/7 brgreen 240 #4e4e4e 45 -07 -07 88 110 117 194 25 46
base00 #657b83 11/7 bryellow 241 #585858 50 -07 -07 101 123 131 195 23 51