Skip to content

Instantly share code, notes, and snippets.

View alekseysidorov's full-sized avatar
👽
Learning Haskell

Aleksey Sidorov alekseysidorov

👽
Learning Haskell
  • Hello world
  • undefined
View GitHub Profile
@alekseysidorov
alekseysidorov / shell.nix
Last active May 27, 2023 04:26
Docker images builder powered by the nixpkgs-cross-overlay
{ localSystem ? builtins.currentSystem
, crossSystem ? { config = "x86_64-unknown-linux-musl"; isStatic = true; useLLVM = true; }
}:
let
# Fetch the nixpkgs-cross-overlay sources.
src = builtins.fetchTarball "https://github.com/alekseysidorov/nixpkgs-cross-overlay/tarball/main";
# Use the nixpkgs revision provided by the overlay.
# This is the best way, as they are the most proven and compatible.
nixpkgs = "${src}/utils/nixpkgs.nix";
# Make cross system packages.
@alekseysidorov
alekseysidorov / shell-rust-cross.nix
Created January 28, 2023 11:24
Rust cross-compilation shell based on Nix Package Manager
# A standalone nix shell file to setup Rust cross-compilation toolchain.
#
# This file does not have any additional dependencies and is completely self-sufficient.
# You can use the `nix-shell` command and get the working cross-compilation toolchain.
# By default, it produces completely static binaries, which can be placed into the
# Alpine Linux container as is.
#
# # Usage:
#
# `nix-shell ./shell-rust-cross.nix`
text: messageTextOnChecking.quantity() > 2000 ?
qsTr("Check that <font color='white'>\"%1\"</font>" +
" is full of <font color='white'>%2 %3</font>" +
" and add more if necessary"
).arg(worker.drawerToCheck(loadSubstratePage.machineName).drawerId)
.arg(worker.drawerToCheck(loadSubstratePage.machineName).humanizedSize)
.arg(messageTextOnChecking.substrateName())
:
qsTr("Check that there is at least <font color='white'>%1 sheets" +
" (%2 inches)</font>" +
processor : 5
vendor_id : AuthenticAMD
cpu family : 16
model : 10
model name : AMD Phenom(tm) II X6 1090T Processor
stepping : 0
microcode : 0x10000dc
cpu MHz : 800.000
cache size : 512 KB
physical id : 0
@alekseysidorov
alekseysidorov / make_barcodes.py
Created March 2, 2016 11:38
Usage: make_barcodes.py --barcodes code1 code2 -o out.png
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from PIL import Image
import requests
from io import BytesIO
import argparse
def make_barcode(barcode):
url = "http://barcode.tec-it.com/barcode.ashx?data={0}&amp;code=Code128&amp;dpi=96&amp;download=true".format(barcode)
ListMerger {
target: window
property: "values"
values: [
"I am a child",
]
}
ListMerger {