Skip to content

Instantly share code, notes, and snippets.

View jonaskgandersson's full-sized avatar

Jonas Andersson jonaskgandersson

  • Gothenburg, Sweden
View GitHub Profile
@jonaskgandersson
jonaskgandersson / linuxNetwork.md
Created September 12, 2023 13:07
Linux network

Disable IPV6

Run the following to disable IPV6, reverts at reboot

echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6

Add the following lines to /etc/sysctl.conf to make change permanent

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
# ANSI Escape codes, colors in shell

RED='\033[0;31m'
NC='\033[0m' # No Color
BG_GREEN='\033[42;30m'
GREEN='\033[0;32m'
BG_RED='\033[41;30m'

@jonaskgandersson
jonaskgandersson / yocto_license_path_npm.txt
Created August 12, 2020 09:25
Yocto get license path and md5 checksum for npm packages using openssl and vim
YOCTO Patterns:
['*LICEN[CS]E*', 'COPYING*', '*[Ll]icense*', 'LEGAL*', '[Ll]egal*', '*GPL*', 'README.lic*', 'COPYRIGHT*', '[Cc]opyright*', 'e[dp]l-v10']
FIND ALL LIC FILES
find ./ -iname "*licen[cs]e*" -o -iname "copying*" -o -iname "legal*" -o -iname "*GPL*" -o -iname "readme.lic*" -o -iname "copyright*" -o -iname "e[dp]l-v10"
HASH ALL Files
openssl md5 $(find ./ -iname "*licen[cs]e*" -o -iname "copying*" -o -iname "legal*" -o -iname "*GPL*" -o -iname "readme.lic*" -o -iname "copyright*" -o -iname "e[dp]l-v10")
@jonaskgandersson
jonaskgandersson / yocto_lockdown_manual_create.txt
Created August 12, 2020 09:23
Yocto create lockdown file for npm recipes using openssl and vim
Generate lockdown file with openssl and vim.
Clean download files, and fetch recipe again.
Open downloads/npm/packageName.
Run openssl sha1 * > lockdown_0.0.0.json
Search replace lockdown.json from openssl sha1 * in vim
:%s/SHA1(/ "/g
:%s/-\([0-9]\+\.[0-9]\+\.[0-9]\+\)\(.tgz)= \)/": {\r "\1": "/g
:%s/\(\w\)\n/\1"\r },\r/g
@jonaskgandersson
jonaskgandersson / VS Code Task Arg
Created July 13, 2018 12:27
Possible solution to run VS Code task and passing arguments
https://stackoverflow.com/questions/45582698/is-it-possible-to-pass-arguments-to-a-task-in-visual-studio-code
{
"label": "runwithargs",
"type": "shell",
"windows": {
"options": {
"shell": {
"executable": "powershell.exe",
"args": [
@jonaskgandersson
jonaskgandersson / Linux CMD.md
Last active July 28, 2022 05:12
Some Linux CMD strings

Netcat, not wait for buffer

stty -icanon && nc

Git

Specify private key

GIT_SSH_COMMAND='ssh -i private_key_file -o IdentitiesOnly=yes' git clone user@host:repo.git

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@jonaskgandersson
jonaskgandersson / README-Template.md
Created March 23, 2018 08:14 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites