Skip to content

Instantly share code, notes, and snippets.

Nicholas Wolverson nwolverson

Block or report user

Report or block nwolverson

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
View json.log
This file has been truncated, but you can view the full file.
Debugger listening on port 11128.
Warning: This is an experimental feature and could change at any time.
To start debugging, open the following URL in Chrome:
chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:11128/762898b5-b49b-4cbd-818c-1f70111ce54e
[Trace - 21:53:30] Sending notification '$/setTraceNotification'.
Params: {
"value": "verbose"
}
View json.log
This file has been truncated, but you can view the full file.
Debugger listening on port 11128.
Warning: This is an experimental feature and could change at any time.
To start debugging, open the following URL in Chrome:
chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:11128/762898b5-b49b-4cbd-818c-1f70111ce54e
[Trace - 21:53:30] Sending notification '$/setTraceNotification'.
Params: {
"value": "verbose"
}
View DataTypes.purs
module DataTypes where
data Foo = Foo
mkFoo = Foo
data Bar = Bar
data Baz = Baz1 | Baz2
View package-entry.sh
#!/bin/bash
# TODO: Get current git tag
VER=${1:-"1.0.0"}
psc-package dependencies | perl -pe 's/^(.*)$/"\1"/g' | jq -s . > deps.json
jq < psc-package.json --slurpfile bower bower.json --slurpfile deps deps.json --arg version "$VER" --arg deps "$DEPS" \
'{(.name): { dependencies: ($deps | .[0]), repo: ($bower | .[0].repository.url | gsub("git:";"https:") ), version: $version } }'
@nwolverson
nwolverson / package-from-bower.sh
Created Mar 9, 2017
create psc-package.json from bower.json
View package-from-bower.sh
#!/bin/bash
SET=${1:-"erl-0.10.5"}
SOURCE=${2:-"https://github.com/purerl/package-sets.git"}
if [ ! -f "psc-package.json" ]; then
jq < bower.json "{name, set: \"$SET\", source: \"$SOURCE\", depends: [] }" > psc-package.json
fi
jq < bower.json '.dependencies | keys | map(gsub("purescript-";"")) | join("\n")' -r | while read -r line ; do
psc-package install $line;
View debugging atom & vscode with psc-ide-server.md

Normally the plugin starts psc-ide-server automatically, and writes the server port to a file. It may help to run psc-ide-server manually with debug flag to diagnose issues, as follows.

(In purescript project, ie the place where bower.json lives)

echo -n 1234 > .psc-ide-port
psc-ide-server -p 1234 --debug
View barchart1.js
var BarChart1 = React.createClass({
render: function() {
var x = scale.linear()
.domain([0, _.max(this.props.data)])
.range([0, 420]);
return (
<div className="chart">
{
this.props.data.map(function (n) {
View PowerShell.ps1
function Get-VisualChildren($item) {
for ($i = 0; $i -lt [System.Windows.Media.VisualTreeHelper]::GetChildrenCount($item); $i++) {
$child = [System.Windows.Media.VisualTreeHelper]::GetChild($item, $i)
Get-VisualChildren($child)
}
$item
}
function Get-TreeItems {
Get-VisualChildren $snoopui | ? { $_.GetType().Name -eq "ProperTreeViewItem" }
@nwolverson
nwolverson / Charting.fs
Created Jun 14, 2013
Examples of using Visiblox Charts with F#, with a simple wrapper.
View Charting.fs
namespace Visiblox.FSharp.Charting
open Visiblox.Charts
open System.Collections.Generic
module Data =
let private ds (x: DataPoint<_,_> seq) = new DataSeries<_,_>(x)
let Point (x,y) = new DataPoint<_,_>(x,y)
let MultiValuePoint x ys = new MultiValuedDataPoint<_,_>(x, new Dictionary<_,_>(dict ys))
You can’t perform that action at this time.