Skip to content

Instantly share code, notes, and snippets.

View p-alik's full-sized avatar

Alexei Pastuchov p-alik

View GitHub Profile
p-alik / etc-nixos
Last active April 19, 2024 08:55
NixOS config on Dell XPS 13 Plus 9320
# /etc/nixos/configuration.nix
{ config, pkgs, ... }:
imports =
boot.loader.systemd-boot.enable = true;
p-alik /
Last active June 6, 2020 05:24
minimal MySql wundergraph::query_builder::mutations::insert::HandleInsert implementation
use diesel::associations::HasTable;
use diesel::backend::Backend;
use diesel::deserialize::FromSql;
use diesel::dsl::SqlTypeOf;
use diesel::expression::{Expression, NonAggregate, SelectableExpression};
use diesel::insertable::CanInsertInSingleQuery;
use diesel::mysql::Mysql;
use diesel::query_builder::{BoxedSelectStatement, QueryFragment};
use diesel::query_dsl::methods::{BoxedDsl, FilterDsl};
use diesel::r2d2::{ConnectionManager, Pool, PooledConnection};
p-alik /
Created March 18, 2019 16:47
Trace OTRS TicketSearch Request
use v5.10;
use strict;
use warnings;
use SOAP::Lite (+trace => "all");
my $proxy = "https://domain/otrs/";
my $soap = SOAP::Lite->new(proxy => $proxy);
my ($user, $pw) = (qw/foo bar/);
This file has been truncated, but you can view the full file.
[INFO] Scanning for projects...
[WARNING] Some problems were encountered while building the effective model for org.eclipse.jetty:jetty-distribution:pom:9.4.13-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-dependency-plugin @ org.eclipse.jetty:jetty-distribution:[unknown-version], /opt/devel/workspace/java/jetty.project/jetty-distribution/pom.xml, line 140, column 15
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[INFO] ------------------------------------------------------------------------
p-alik / cli requests to cardano-sl api
Last active September 10, 2020 07:36
list accounts, list wallet transactions history
# create a new wallet
$ curl -H "Content-Type: application/json" --cacert cardano-sl/scripts/tls-files/ca.crt https://localhost:8090/api/wallets/new -d '{
"cwInitMeta": {
"cwName": "my-cardano-wallet",
"cwAssurance": "CWAStrict",
"cwUnit": 0
"cwBackupPhrase": {
p-alik /
Last active February 2, 2020 19:38 — forked from timmytofu/
ghc-pkg-clean and ghc-pkg-reset compatible with both zsh and bash
# unregister broken GHC packages. Run this a few times to resolve dependency rot in installed packages.
# ghc-pkg-clean -f cabal/dev/packages*.conf also works.
function ghc-pkg-clean() {
for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'`
echo unregistering $p; ghc-pkg $* unregister $p
# remove all installed GHC/cabal packages, leaving ~/.cabal binaries and docs in place.