Skip to content

Instantly share code, notes, and snippets.

View rohan-molloy's full-sized avatar

Rohan rohan-molloy

View GitHub Profile
import requests
import os
import uuid
import hashlib
def download_file_hash(url, extension='txt'):
response = requests.get(url)
if response.status_code == 200:
sha256hash = hashlib.sha256(response.content).hexdigest()
filename = f'{sha256hash}.{extension}'
with open(filename, 'wb') as file:

Problem

2023-09-27T10:52:26.802Z In(05) host-3241276 Using kernel build system.
2023-09-27T10:52:26.802Z In(05) host-3241276 /tmp/modconfig-MRgyG5/vmnet-only/bridge.c: In function ‘VNetBridgeSendLargePacket’:
2023-09-27T10:52:26.802Z In(05) host-3241276 /tmp/modconfig-MRgyG5/vmnet-only/bridge.c:1413:11: error: implicit declaration of function ‘skb_gso_segment’; did you mean ‘tcp_gso_segment’? [-Werror=implicit-function-declaration]
2023-09-27T10:52:26.802Z In(05) host-3241276  1413 |    segs = skb_gso_segment(skb, 0);
2023-09-27T10:52:26.802Z In(05) host-3241276       |           ^~~~~~~~~~~~~~~
2023-09-27T10:52:26.802Z In(05) host-3241276       |           tcp_gso_segment
2023-09-27T10:52:26.802Z In(05) host-3241276 /tmp/modconfig-MRgyG5/vmnet-only/bridge.c:1413:9: warning: assignment to ‘struct sk_buff *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
2023-09-27T10:52:26.802Z In(05) host-3241276  1413 |    segs = skb_gso_segment(skb, 0);
@rohan-molloy
rohan-molloy / Disable-Teams-Autostart.md
Created August 15, 2022 09:24
How to stop teams starting at logon

Disable Teams Autostart

  1. Create the file C:\Windows\System32\GroupPolicy\User\Scripts\Logon\disableteams.cmd with the following contents
%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe -File %WINDIR%\System32\GroupPolicy\User\Scripts\Logon\disableteams.ps1
  1. Create the file C:\Windows\System32\GroupPolicy\User\Scripts\Logon\disableteams.ps1 with the following contents
$entry = $null -eq (Get-ItemProperty HKCU:\Software\Microsoft\Windows\CurrentVersion\Run)."com.squirrel.Teams.Teams"
if ( !$entry ) {
#!/bin/bash
# Variables
LINK='enp0s20f0u4u3'
ADDR='192.168.8.100/24'
NETNS='testns'
BROWSER='chromium-browser'
# Create the network namespace
echo "Creating ${NETNS}" 1>&2
@rohan-molloy
rohan-molloy / download-docker-cli.sh
Created May 13, 2022 08:08
Download standalone docker cli
export DOCKERVERSION=20.10.5
curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKERVERSION}.tgz \
&& tar xzvf docker-${DOCKERVERSION}.tgz --strip 1 \
-C /usr/local/bin docker/docker \
&& rm docker-${DOCKERVERSION}.tgz
@rohan-molloy
rohan-molloy / Install Windows from command line.md
Created April 30, 2022 04:59
Install windows from the command line

Installing Windows via command line

  • Step 1: Boot from the ISO and press shift 10

  • Step 2: Run diskpart

select disk 0
clean
convert gpt
@rohan-molloy
rohan-molloy / Install Vmware Kernel Modules on Fedora.md
Created March 23, 2022 07:20
Install Vmware Kernel Modules on Fedora.md

Install Vmware Kernel Modules on Fedora

CPATH=/usr/src/kernels/$(uname -r | sed 's/+debug//')/include/linux vmware-modconfig --console --install-all
call plug#begin()
Plug 'elzr/vim-json' " For metadata.json
Plug 'mrk21/yaml-vim' " For hieradata
"Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}} " Language Server support
Plug 'rodjek/vim-puppet' " For Puppet syntax highlighting
Plug 'vim-ruby/vim-ruby' " For Facts, Ruby functions, and custom providers
Plug 'vimwiki/vimwiki'
Plug 'airblade/vim-gitgutter'
Plug 'ryanoasis/vim-devicons'
@rohan-molloy
rohan-molloy / randomIPv6.js
Created August 21, 2021 05:10
generate a random ipv6 address
// Generate a Random Mac
function randomMac() {
return "XX:XX:XX:XX:XX:XX".replace(/X/g, function() {
return "0123456789ABCDEF".charAt(Math.floor(Math.random() * 16))
}
)
};
// Generate IPv6 EUI64
@rohan-molloy
rohan-molloy / Installing VMWare Workstation 16 on Fedora 33.md
Created February 27, 2021 05:55
Installing VMWare Workstation 16 on Fedora 33