Skip to content

Instantly share code, notes, and snippets.

View Samk13's full-sized avatar
πŸ€
Busy coding...

Sam Arbid Samk13

πŸ€
Busy coding...
View GitHub Profile
@Samk13
Samk13 / apply_patch.md
Last active August 28, 2023 10:02
How to apply a patch for a python package

Working:

Download the patch:

curl 

Didn't work as expected

Instructions to apply a specific PR to a package (invenio-rdm-records as example)

@Samk13
Samk13 / Windows folder Permissions Cleanup.md
Last active August 2, 2023 22:27
Windows folder Permissions Cleanup

Context:

After a Windows reset, certain folders may retain permissions from non-existing accounts, leading to "Permission denied" errors. This Gist provides commands to take ownership, grant full permissions, and remove a specific folder on drive to resolve the issue.

# Take ownership and grant full permissions
takeown /F D:\Foldername p /R /A
icacls D:\Foldername /grant "YourUserName":(F) /T

# Remove the folder and its contents

Invenio setup on Ubuntu

Install pyenv

sudo apt-get update; sudo apt-get install --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev checkinstall libncursesw5-dev libgdbm-dev libc6-dev
curl https://pyenv.run | bash # https://github.com/pyenv/pyenv#automatic-installer
@Samk13
Samk13 / LinuxCommands.md
Last active December 5, 2023 22:25
Linux commands

Extending Linux Volume

A concise guide to expanding the storage space on a Linux system using command-line utilities.

Displaying Disk Information

To view your current disk volumes and partitions:

lsblk
@Samk13
Samk13 / .vimrc
Created July 15, 2022 11:40
Simple Vim configuration with no plugins
"Vim configuration file
" Enable moouse support
set mouse=a
" Enable syntax
syntax on
" Enable line numbers
set number
@Samk13
Samk13 / openshift-cheatsheet.md
Created March 11, 2022 10:59 — forked from rafaeltuelho/openshift-cheatsheet.md
My Openshift Cheatsheet

My Openshift Cheatsheet

Openshift build secrets for cloning git repos using SSH Keys

  • To create ssh secret:
oc create secret generic sshsecret \
    --from-file=ssh-privatekey=$HOME/.ssh/id_rsa
@Samk13
Samk13 / .bashrc
Last active December 27, 2023 22:39
bashrc customization
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@Samk13
Samk13 / index.html
Created July 28, 2019 10:38
Tic Tac Toe
<div id="errors" style="
background: #c00;
color: #fff;
display: none;
margin: -20px -20px 20px;
padding: 20px;
white-space: pre-wrap;
"></div>
<div id="root"></div>
<script>