Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Dima Pasechnik dimpase

🏠
Working from home
View GitHub Profile
@dimpase
dimpase / gist:4992965
Created Feb 20, 2013
A bit of CA in Haskell. The hardest part was to figure out nf, to ensure strict evaluation.
View gist:4992965
module Main where
import Math.CommutativeAlgebra.Polynomial
import Math.Algebras.VectorSpace -- for nf
main =
print (adder 10000000 d e)
where
[x,y] = map glexvar ["x","y"]
a = 4*x^2 + 3*x + 2
@dimpase
dimpase / dir_x
Created Apr 27, 2017
dir(x) for that weird type
View dir_x
sage: dir(polygen(RR))
['N',
'__add__',
'__call__',
'__class__',
'__cmp__',
'__copy__',
'__delattr__',
'__delitem__',
@dimpase
dimpase / x.py
Created Sep 2, 2017
random weird FB stuff
View x.py
# run in Python 3, e.g. via importing
B=bytes(
map(
lambda x: x-1,
filter(
lambda y: y < sum(2**x for x in {z for z in range(7)}-{2}),
b'~b{qq}mz!o|px'
)
)
)
View Hn2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dimpase
dimpase / passgitgpg.md
Created Oct 22, 2021 — forked from flbuddymooreiv/passgitgpg.md
Setting up pass on git with a gpg key
View passgitgpg.md

The following shell transcript shows how to:

  • Create a GPG key
  • Create a pass database
  • Add git support to the pass database
  • Create a remote git repository
  • Push the pass database to the remote git repository
  • Fetch and display your passwords from another host

It is assumed that the pass package has been installed on both the first and second computers.

@dimpase
dimpase / gpg-ssh-setup.md
Created Nov 19, 2021 — forked from mcattarinussi/gpg-ssh-setup.md
A setup guide to use a personal gpg key for ssh authentication
View gpg-ssh-setup.md

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.

@dimpase
dimpase / compile_deploy_latex.yml
Created Dec 17, 2021 — forked from dgerosa/writeapaper.yml
Github workflow to compile and deploy latex
View compile_deploy_latex.yml
# Github workflow to compile latex and deploy the pdf to an orphan branch.
# Davide Gerosa (2021) https://github.com/dgerosa
# Edit the DIR and FILE variables with the location of the latex file.
# Place the yml file in a directory called .github/workflows
# The latest compiled pdf is made available at e.g.
# https://github.com/dgerosa/[repositoryname]/blob/build/[filename].pdf
# You can also add a badge to your README: