Skip to content

Instantly share code, notes, and snippets.

gistlyn

Block or report user

Report or block gistlyn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gistlyn
gistlyn / sync-fv.sc.hbs
Last active Sep 30, 2019
Script to update ServiceStack's modified interned version of Fluent Validation
View sync-fv.sc.hbs
vfsFileSystem('.') |> to => source
vfsFileSystem('../../ServiceStack/src/ServiceStack/') |> to => target
#function transform (src)
return (src.replace('namespace FluentValidation', 'namespace ServiceStack.FluentValidation'))
/function
`\nWriting files in: FluentValidation.ValidatorAttribute/ ...`
#each file in dirFiles('FluentValidation.ValidatorAttribute').where(f => f.Name.endsWith('.cs'))
file.textContents() |> transform |> to => updated
@gistlyn
gistlyn / parse-rss.l
Last active Sep 20, 2019
Simple #Script Lisp RSS Parser
View parse-rss.l
(defn parse-rss [xml]
(let ( (to) (doc) (channel) (items) (el) )
(def doc (System.Xml.Linq.XDocument/Parse xml))
(def to (ObjectDictionary.))
(def items (List<ObjectDictionary>.))
(def channel (first (.Descendants doc "channel")))
(def el (XLinqExtensions/FirstElement channel))
; retrieve all elements up to the first <item> as top-level entries
(while (not= (.LocalName (.Name el)) "item")
@gistlyn
gistlyn / index.md
Last active Sep 20, 2019
#Script Lisp Index
View index.md

#Script Lisp Library Index

@gistlyn
gistlyn / lib1.l
Created Sep 14, 2019
Lisp Libs tests
View lib1.l
(defn lib-calc [a b] (+ a b))
@gistlyn
gistlyn / Configure.Nuglify.cs
Last active Aug 28, 2019
Configure ServiceStack to use Nuglify's Advanced JS/CSS/HTML Minifiers
View Configure.Nuglify.cs
using ServiceStack;
using ServiceStack.Html;
using NUglify;
namespace MyApp
{
public class NUglifyJsMinifier : ICompressor
{
public string Compress(string js) => Uglify.Js(js).Code;
}
@gistlyn
gistlyn / app.my-app.conf
Last active Aug 16, 2019
Supervisor config for managed execution of .NET Core Apps
View app.my-app.conf
[program:app-my-app]
command=/usr/bin/dotnet /home/deploy/apps/my-app/MyApp.dll
directory=/home/deploy/apps/my-app
autostart=true
autorestart=true
stderr_logfile=/var/log/app-my-app.err.log
stdout_logfile=/var/log/app-my-app.out.log
environment=ASPNETCORE_ENVIRONMENT=Production,ASPNETCORE_URLS="http://*:5000/"
user=deploy
stopsignal=INT
View _layout.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ title }}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<style>
@gistlyn
gistlyn / _init.html
Last active Aug 19, 2019
Rockwind Live Gist App
View _init.html
<!--
layout: none
-->
```code
vfsFileSystem('.') | to => fs
#if !fs.fileExists('northwind.sqlite') || fs.file('northwind.sqlite').Length == 0
fs.writeFile('northwind.sqlite', file('northwind.readonly.sqlite'))
/if
@gistlyn
gistlyn / GPUCache\data_0
Last active Aug 19, 2019
Plugins Live Gist App
@gistlyn
gistlyn / _layout.html
Last active Aug 5, 2019
Basic Sharp Content Website
View _layout.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ title }}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="stylesheet" href="/css/bootstrap.css">
You can’t perform that action at this time.