Skip to content

Instantly share code, notes, and snippets.

Avatar

Sergey Ivanov ivanovs-4

  • Russia, Saratov
View GitHub Profile
View services.xserver.nix
services.xserver = {
enable = true;
layout = "us,ru";
xkbOptions = "eurosign:e, caps:swapescape, grp:win_space_toggle";
libinput.enable = true;
displayManager.gdm.enable = true;
displayManager.gdm.wayland = true;
displayManager.defaultSession = "none+i3";
View nix-i3-gnome3-excerpt
services.xserver = {
enable = true;
_ layout = "us,ru";
xkbOptions = "eurosign:e, caps:swapescape, grp:win_space_toggle";
libinput.enable = true;
displayManager.gdm.enable = true;
displayManager.gdm.wayland = true;
displayManager.defaultSession = "none+i3";
View .tmux.conf
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'seebi/tmux-colors-solarized'
set -g @colors-solarized 'dark'
# set -g @colors-solarized 'light'
set -g @plugin 'tmux-plugins/tmux-sessionist'
View ed25519
js nem-sdk:
kp = nem.crypto.keyPair.create("bbd6bcf6faa4d1500199dcf22fd291f9f374e21e86170ebcdf4c7a44eb388863")
KeyPair {publicKey: BinaryKey, secretKey: Uint8Array(32), sign: ƒ}
kp.publicKey.toString()
"550f7d923b01724f4596da353556da603eaaf6048429749a29cf732d588a04a4"
kp.sign(nem.utils.convert.hex2a("1234567890")).toString()
"61291eb4711fec84258ba008e11f5fef3f2eef15ec924f85e92dc89494c74a49ebbdedab83ab1e50d55edf93ced8004a505a6a98c643b8cb02863d8b9c03a106"
View typeclass-example.hs
module Main where
class Five
data X = X
data Y = Y
instance Five X
instance Five Y
View compose-IO-Either.hs
main :: IO ()
main = do
exa <- makeEitherXA
case exa of
Left x -> undefined -- whatever
Right a -> do
eyb <-makeEitherYB a
case eyb of
Left y -> undefined --whatever
Right b -> do
View keybase.md

Keybase proof

I hereby claim:

  • I am ivanovs-4 on github.
  • I am ivanovs4 (https://keybase.io/ivanovs4) on keybase.
  • I have a public key ASBRygAkl0eppE6xcsDI9S5Igk-UalKOShg9wikyAln6Vgo

To claim this, I am signing this object:

@ivanovs-4
ivanovs-4 / gist:9a4c91cfd2c91426ed6b8d7ab639a43c
Created Aug 16, 2016
FastTrack setup alsamixer routing
View gist:9a4c91cfd2c91426ed6b8d7ab639a43c
# sudo apt-get install python-alsaaudio
import alsaaudio as a
def eq(q, p):
return q == p