Skip to content

Instantly share code, notes, and snippets.

View willbasky's full-sized avatar

Vladislav Sabanov willbasky

  • Buenos Aires
View GitHub Profile
@willbasky
willbasky / gist:71e604aede37d53954ce5b0a1cb6d93d
Created May 20, 2017 06:16
Greensleeves, traditional English song, Sonic Pi code
#Greensleeves, traditional English song
#
# Coded by Vladislav Sabanov
use_bpm 112
use_synth :piano
use_synth_defaults release: 1, decay: 1, amp: 2
in_thread do
play_pattern_timed [:a4], [1] #begin_1
@willbasky
willbasky / gist:223359c606a437153b3afa7dfc724dc1
Last active May 20, 2017 06:20
Spring night, Sonic Pi code, my first music
# Spring night
#
# Coded by Vladislav Sabanov
live_loop :foo do
with_fx :echo do
sample :elec_ping
end
@willbasky
willbasky / greenslaves.tidal
Last active December 5, 2017 16:17
Greenslaves, old English song, made with TidalCycles
-- Coded by Vladislav Sabanov
cps (6/60/3)
d2 $ note "[a4 ~ c5 ~ ~ ~ d5 ~ e5 ~ ~ f5 e5 ~ d5 ~ ~ ~ b4 ~ g4 ~ ~ a4 b4 ~ c5 ~ ~ ~ a4 ~ a4 ~ ~ gs4 a4 ~ b4 ~ ~ ~ gs4 ~ e4 ~ ~ ~ a4 ~ c5 ~ ~ ~ d5 ~ e5 ~ ~ f5 e5 ~ d5 ~ ~ ~ b4 ~ g4 ~ ~ a4 b4 ~ c5 ~ ~ b4 a4 ~ gs4 ~ ~ fs4 gs4 ~ a4 ~ ~ ~ ~ ~ a4 ~ ~ ~ ~ ~ g5 ~ ~ ~ ~ ~ g5 ~ ~ f5 e5 ~ d5 ~ ~ ~ b4 ~ g4 ~ ~ a4 b4 ~ c5 ~ ~ ~ a4 ~ a4 ~ ~ gs4 a4 ~ b4 ~ ~ ~ gs4 ~ e4 ~ ~ ~ ~ ~ g5 ~ ~ ~ ~ ~ g5 ~ ~ f5 e5 ~ d5 ~ ~ ~ b4 ~ g4 ~ ~ a4 b4 ~ c5 ~ ~ b4 a4 ~ gs4 ~ ~ fs4 gs4 ~ a4 ~ ~ ~ ~ ~ a4 ~ ~ ~ ~ ~]"
# sound "superpiano"
# sustain "2 4 2 3 1 2 4 2 3 1 2 4 2 3 1 2 4 2 4 2 4 2 3 1 2 4 2 3 1 2 4 1 2 3 1 2 6 6 6 3 1 2 4 2 3 1 2 4 2 3 1 2 4 2 4 6 3 1 2 4 2 3 1 2 3 1 2 3 1 2 6 6"
@willbasky
willbasky / .ghci
Last active January 17, 2018 05:30
Color+pretty prints or cyrillic (and other unicode)
import Text.Show.Unicode
import IPPrint
import qualified Language.Haskell.HsColour as HsColour
import qualified Language.Haskell.HsColour.Colourise as HsColour
import qualified Language.Haskell.HsColour.Output as HsColour
myColourPrefs = HsColour.defaultColourPrefs { HsColour.conid = [HsColour.Foreground HsColour.Yellow, HsColour.Bold], HsColour.conop = [HsColour.Foreground HsColour.Yellow], HsColour.string = [HsColour.Foreground HsColour.Green], HsColour.char = [HsColour.Foreground HsColour.Cyan], HsColour.number = [HsColour.Foreground HsColour.Red, HsColour.Bold], HsColour.layout = [HsColour.Foreground HsColour.White], HsColour.keyglyph = [HsColour.Foreground HsColour.White] }
myPrint :: (Show a) => a -> IO (); myPrint = putStrLn . HsColour.hscolour (HsColour.TTYg HsColour.XTerm256Compatible) myColourPrefs False False "" False . pshow
@willbasky
willbasky / ghc-mod error
Last active April 3, 2018 07:56
ghc-mod error in atom
[1 of 5] Compiling CabalHelper.Types ( CabalHelper/Types.hs, /home/user/.ghc-mod/cabal-helper/CabalHelper/Types.o )
[2 of 5] Compiling CabalHelper.Sandbox ( CabalHelper/Sandbox.hs, /home/user/.ghc-mod/cabal-helper/CabalHelper/Sandbox.o )
[3 of 5] Compiling CabalHelper.Licenses ( CabalHelper/Licenses.hs, /home/user/.ghc-mod/cabal-helper/CabalHelper/Licenses.o )
CabalHelper/Licenses.hs:56:8: error:
• Expecting one more argument to ‘CPackageIndex ModuleName’
Expected a type, but ‘CPackageIndex ModuleName’ has kind ‘* -> *’
• In the type signature:
findTransitiveDependencies :: CPackageIndex ModuleName
-> Set CInstalledPackageId -> Set CInstalledPackageId
@willbasky
willbasky / cabal-helper
Created April 3, 2018 07:57
Cabal-helper places
/home/user/.ghc-mod/cabal-helper
/home/user/.ghc-mod/cabal-helper/CabalHelper
/home/user/.ghc-mod/cabal-helper/Main.hi
/home/user/.ghc-mod/cabal-helper/Main.o
/home/user/.ghc-mod/cabal-helper/cabal-helper-0.7.3.0-Cabal-1.24.2.0
/home/user/.ghc-mod/cabal-helper/CabalHelper/Common.hi
/home/user/.ghc-mod/cabal-helper/CabalHelper/Common.o
/home/user/.ghc-mod/cabal-helper/CabalHelper/Licenses.hi
/home/user/.ghc-mod/cabal-helper/CabalHelper/Licenses.o
/home/user/.ghc-mod/cabal-helper/CabalHelper/Sandbox.hi
Date: Apr 23 2018
Fix install instruction
Date: Apr 22 2018
Version 0.3
Move tasks from personal ff to the project repo
Update to crdt-10.0: use RGA without Maybe
Date: Apr 21 2018
Update Qtah to upstream 0.4.0 + 2018-04-09
{-# LANGUAGE StrictData #-}
module FF.Options
( Cmd (..)
, CmdAction (..)
, Config (..)
, DataDir (..)
, Edit (..)
, New (..)
, Search (..)
@willbasky
willbasky / shell
Created October 10, 2018 09:43
ff search
$ ff search -w wiki -b
Wiki notes:
* Hello, wiki! | id 474uyd0t4oq-2lvlyseskf
* wiki | id 47jkpd8vkk8-2lvlyseskf
* wiki4 | id 47jlvd36qy3-2lvlyseskf
* wiki5 | id 47jlvq67rik-2lvlyseskf
* wiki4 | id 47jlvzc1kki-2lvlyseskf
$ ff search -c wiki -b
Contacts:
* wiki | id 47jodpnkeod-2lvlyseskf
@willbasky
willbasky / hs
Last active October 10, 2018 13:48
CmdShow id -> do
doc <- cmdShowId @Note id
case doc of
Right Storage.Document{value} -> pprint $ withHeader "Note:" $ UI.noteViewFull $ noteView id value
Left _ -> do
doc <- cmdShowId @Contact id
case doc of
Right Storage.Document{value} -> pprint $ withHeader "Contact:" $ UI.contactViewFull $ contactView id value
Left e -> liftIO $ pprint a