Skip to content

Instantly share code, notes, and snippets.

View fedorov's full-sized avatar
🇺🇦
Времена не выбирают, в них живут и умирают. - Александр Кушнер

Andrey Fedorov fedorov

🇺🇦
Времена не выбирают, в них живут и умирают. - Александр Кушнер
View GitHub Profile
@salrashid123
salrashid123 / cos_gcp_direct.md
Created October 20, 2020 15:32
Create LUKS mount on GCP COS image (direct)

Stage Disk with LUKS (direct)

Procedure to mount a LUKS encrypted device into a Container Optimized OS.

  • Create a disk and attach to a plain VM
  • Create format and mount as LUKS
  • Write file to LUKS mount path
@dobrosketchkun
dobrosketchkun / doirefer.py
Last active February 18, 2024 14:20
DOI to citation
#!/usr/bin/env python
#http://www.crosscite.org/cn/
import requests
import json
class CrossRefClient(object):
def __init__(self, accept='text/x-bibliography; style=apa', timeout=3):
"""
@bzerangue
bzerangue / json-to-ndjson.md
Last active January 31, 2024 20:57
JSON to NDJSON

NDJSON is a convenient format for storing or streaming structured data that may be processed one record at a time.

  • Each line is a valid JSON value
  • Line separator is ‘\n’

1. Convert JSON to NDJSON?

cat test.json | jq -c '.[]' > testNDJSON.json
@ateucher
ateucher / setup-gh-cli-auth-2fa.md
Last active May 3, 2024 11:06
Setup git on the CLI to use 2FA with GitHub

These are instructions for setting up git to authenticate with GitHub when you have 2-factor authentication set up. This authentication should be inherited by any GUI client you are using. These are intentionally brief instructions, with links to more detail in the appropriate places.

  1. Download and install the git command-line client (if required).

  2. Open the git bash window and introduce yourself to git (if required):

    git config --global user.name 'Firstname Lastname'
    git config --global user.email '[email protected]'
    
@gwatts
gwatts / github-release-stats.py
Last active March 22, 2021 07:22
Formats the release download stats for a Github project.
#!/usr/bin/python
# Little script to display file download statistics for
# the published releases of a Github project.
#
# (c) Gareth Watts 2015
# <[email protected]>
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#!/usr/bin/python
#
# Delete the label image from an Aperio SVS file.
#
# Copyright (c) 2012-2013 Carnegie Mellon University
# All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, version 2.1.