Skip to content

Instantly share code, notes, and snippets.

Avatar

Danylo Hlynskyi danbst

  • Ivano-Frankivsk, Ukraine
View GitHub Profile
@gullyn
gullyn / flappy.html
Last active Jun 26, 2022
Flappy bird in 205 bytes (improved!)
View flappy.html
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@edolstra
edolstra / nix-lang.md
Last active Aug 7, 2022
Nix language changes
View nix-lang.md

This document contains some ideas for additions to the Nix language.

Motivation

The Nix package manager, Nixpkgs and NixOS currently have several problems:

  • Poor discoverability of package options. Package functions have function arguments like enableFoo, but there is no way for the Nix UI to discover them, let alone to provide programmatic ways to
View wireguard-conf.nix
# nixos-rebuild build-vm -I nixpkgs=/home/eric/Projects/nixos/nixpkgs -I nixos-config=/tmp/wireguard-conf.nix
{ config, pkgs, ... }:
{
imports =
[
<nixos/modules/installer/scan/not-detected.nix>
];
nix.maxJobs = 4;
@Pitometsu
Pitometsu / configuration.nix
Last active Jul 25, 2021
NixOS system config
View configuration.nix
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
rec {
imports =
@thoughtpolice
thoughtpolice / phabricator.nix
Created Jul 15, 2015
Extensive Phabricator module for NixOS (with Nginx frontend support)
View phabricator.nix
/*
Example usage (in configuration.nix):
services.phabricator.enable = true;
services.phabricator.baseURI = "secure.example.org";
services.phabricator.baseFilesURI = "secure-files.example.org";
services.phabricator.extensions =
{ libphutil-scrypt = "git://github.com/haskell-infra/libphutil-scrypt.git";
libphutil-yubikey = "git://github.com/thoughtpolice/libphutil-yubikey.git";
@travisbhartwell
travisbhartwell / nix-shell-shebang.md
Last active Jun 6, 2022
nix-shell and Shebang Lines
View nix-shell-shebang.md

NOTE: a more up-to-date version of this can be found on my blog

nix-shell and Shebang Lines

A few days ago, version 1.9 of the Nix package manager was released. From the release notes:

nix-shell can now be used as a #!-interpreter. This allows you to write scripts that dynamically fetch their own dependencies.

@danbst
danbst / hask5.lhs
Last active Oct 2, 2015
Console Tetris
View hask5.lhs
ТЕТРІС 0.0.0.12
Реалізація класичного тетріса (з урізаними можливостями), з виводом у консоль.
Урізано: відображення наступної фігури та рахунку
клавіша прискореного падіння фігури
рівні та зміна швидкостей
Код переписано багато разів, з кожним разом він ставав все кращим та кращим.
> {-# LANGUAGE TemplateHaskell #-}