Skip to content

Instantly share code, notes, and snippets.

@ankitmundada
ankitmundada / download_gdrive
Last active April 17, 2022 23:11
Shell Script to download Publicly shared Google drive files
#!/bin/bash
# Get files from Google Drive
# Source: https://stackoverflow.com/a/50573452/2382312
# Usage: download_gdrive FILE_ID DESTINATION_PATH
# $1 = file ID
# $2 = file name
URL="https://drive.google.com/uc?export=download&id=$1"
@halberom
halberom / htmlfile.html
Created December 6, 2017 11:16
ansible - example of parsing html table into dict
<html><title>Find Location of an IP</title>
<body><font face=\"Arial\">
<H1>Please provide an IP or a LOCATION :</H1>
<p>Search Location, DS site code, Country, Network types or Comments</p>
<form method=\"GET\" action=\"launch_search_IP.pl\">
<p> <input name=\"ip_to_search\" width=\"100%\" height=\"100%\" ></p>
<input type=\"submit\" value=\"Search\"></form>
<p> Here are results for your search of <b> 192.168.0.1 </b> :
<br>
<br>
@djoreilly
djoreilly / ovs-cheat.md
Last active March 15, 2024 13:02
OVS cheat sheet

DB

ovs-vsctl list open_vswitch
ovs-vsctl list interface
ovs-vsctl list interface vxlan-ac000344
ovs-vsctl --columns=options list interface vxlan-ac000344
ovs-vsctl --columns=ofport,name list Interface
ovs-vsctl --columns=ofport,name --format=table list Interface
ovs-vsctl -f csv --no-heading --columns=_uuid list controller
ovs-vsctl -f csv --no-heading -d bare --columns=other_config list port
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule