Skip to content

Instantly share code, notes, and snippets.

View YPares's full-sized avatar

Yves Parès (Ywen) YPares

  • Paris, France
  • 14:43 (UTC +02:00)
View GitHub Profile
width = 80
revset-aliases.safe_heads = "remote_bookmarks()"
revset-aliases.left_target = "trunk()"
revset-aliases.right_target = "@"
colors.change_id.underline = true
colors.change_id.fg = "magenta"
colors.commit_id.underline = true
colors.commit_id.fg = "blue"
use std/dirs
def "path shorten" [--last] {
str replace $env.HOME "~" | if $last {
path split | last
} else { $in }
}
def --env "dirs reset-current" [] {
cd ($env.DIRS_LIST | get $env.DIRS_POSITION)
inputs:
nixpkgs:
"github:NixOS/nixpkgs/nixpkgs-unstable"
omnix:
"github:juspay/omnix/1.0.3"
nushellWith:
"github:ypares/nushellWith"
fenix:
"github:nix-community/fenix"
envs:
declare options "[nvoices:8]";
import("stdfaust.lib");
freq = hslider("freq",100,0,100000,0.01);
gain = hslider("gain",0,0,1,0.0001) : si.smoo;
gate = checkbox("gate");
bend = hslider("bend[0][midi:pitchwheel]",1,0,2,0.001);
atk = hslider("atk[1][midi:ctrl 112]",0.1,0,1,0.001) : si.smoo;
dec = hslider("dec[2][midi:ctrl 113]",0.1,0,1,0.001) : si.smoo;
@YPares
YPares / JVComLastTests.hs
Created April 6, 2012 18:40
JV.com last tests
import Text.XML.HXT.Core
import Text.XML.HXT.HTTP
import Data.List (isInfixOf)
import Data.String.EncodingNames (isoLatin1)
loop [] = return ()
loop (date:title:plat:xs) = putStrLn (date ++ title ++ " " ++ plat) >> loop xs
main = runX ( readDocument [ withParseHTML yes, withHTTP [], withInputEncoding isoLatin1 ] "http://www.jeuxvideo.com/tests.htm"
//> (hasName "li" </ (hasName "a" `guards` hasAttrValue "href" ("test.htm" `isInfixOf`)))