Skip to content

Instantly share code, notes, and snippets.

View Tknott95's full-sized avatar
🍀

TKnott Tknott95

🍀
View GitHub Profile
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active May 5, 2024 00:12
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
@mattiaslundberg
mattiaslundberg / arch-linux-install
Last active March 29, 2024 08:38
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
@SmaugPool
SmaugPool / scripts_resources.md
Last active December 17, 2023 22:35
Scripts Memory Units & Execution Steps used by Cardano transactions & blocks

Smart Contracts on Cardano are Plutus scripts. We often talk about the size of transactions and blocks compared to the maximum currently authorized by the protocol parameters, but scripts are also limited in CPU and memory units.

Here is the description of those 3 properties from Cardano docs:

  • The total on-chain transaction size in bytes: a simple transaction, for example, is around 300 bytes, one with metadata is around 650 bytes, and Plutus scripts are typically 4,000-8,000 bytes (future optimizations and improvements will reduce this).
  • The number of computational (CPU) steps that the script uses: each step represents 1 picosecond of execution time on a benchmark machine. Typical scripts should consume less than 1,000,000,000 (1 millisecond).
  • The number of memory units that the script uses: this represents the number of bytes that the script allocates. Typical scripts should consume less than 1,000,000 memory units (
@p1nox
p1nox / pytorch_rtx_3060.md
Last active December 17, 2023 02:27
PyTorch on RTX 3060

After researching a lot on how to use PyTorch with a RTX 3060 card, specially with older versions or torch (0.4.0) and torchvision (0.2.1), I noticed that it was either impossible or very hard to do. RTX 3060 and these packages apparently doesn't have compatibility with the same versions of CUDA and cuDNN. I tried to do this by using different combinations with compiled versions available in conda, but didn't work, maybe it could work if you recompile from source these versions.

After all this, actually I was able to use RTX 3060 effectively with latest versions of all these dependencies with two methods:

  1. Using a conda env, and latest versions published in pytorch site (https://pytorch.org/get-started/locally):
conda create -n rtx_3060 python=3.6.5
conda activate rtx_3060
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c nvidia
@SmaugPool
SmaugPool / cardano-cli-completion.md
Last active November 29, 2023 11:57
cardano-cli Bash auto-completion

To enable cardano-cli and cardano-node bash auto-completion for the current shell:

source <(cardano-cli --bash-completion-script cardano-cli)
source <(cardano-cli --bash-completion-script cardano-node)

To enable it for all future sessions:

@mikehaertl
mikehaertl / gist:3258427
Created August 4, 2012 15:40
Learn you a Haskell - In a nutshell

Learn you a Haskell - In a nutshell

This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.


1. Introduction

  • Haskell is a functional programming language.
@jason2506
jason2506 / tree.hs
Created March 29, 2012 20:05
[Haskell Practice] binary search tree
-- define data type
data Tree a = EmptyTree | Node a (Tree a, Tree a) deriving (Show, Read, Eq)
-- create single node
treeNode :: a -> Tree a
treeNode item = Node item (EmptyTree, EmptyTree)
-- covert from/to list
treeFromList :: (Ord a) => [a] -> Tree a
treeFromList items = foldr treeInsert EmptyTree $ reverse items
@Tknott95
Tknott95 / nietzsche.MD
Last active December 26, 2019 11:47
“And those who were seen dancing were thought to be insane by those who could not hear the music.” ~Nietzsche
  “And those who were seen dancing were thought to be insane by those who could not hear the music.”
~Nietzsche
@Tknott95
Tknott95 / arch-linux-install
Created February 21, 2018 21:19 — forked from binaerbaum/arch-linux-install
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swiss-french keymap