Skip to content

Instantly share code, notes, and snippets.

Chetan Kunte ckunte

Block or report user

Report or block ckunte

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ckunte /
Created Jul 14, 2019
Count days from start to end dates
#!/usr/bin/env bash
# -- count days from start to end dates input inline
# 2019 ckunte
if [ -z "$*" ]; then
echo 'Include "start" "end" dates inline, e.g.,'
echo '$ bash "1 Apr 2018" "31 Dec 2018"'
exit 0
ckunte /
Created Jul 12, 2019
Fix apt-get hash sum mismatch
sudo apt -o Acquire::https::No-Cache=True -o Acquire::http::No-Cache=True update
sudo apt -o Acquire::https::No-Cache=True -o Acquire::http::No-Cache=True upgrade
ckunte / w2w.csv
Created Jun 16, 2019
Walk-to-work elevation on platforms
View w2w.csv
Platform Operator Location Vessel Gangway system Elevation
Solan 205 Premier Oil West of Shetlands Siem Spearfish Ampelmann 24.500m
Corvette CV Shell SNS Kroonberg Ampelmann 21.500m
Gunflint Spar Noble Energy GOM DOF Skandi7 Ampelmann 21.500m
Cutter QC Onegas SNS Kroonberg Ampelmann 21.200m
L13-FI-1 NAM SNS Kroonberg Ampelmann 19.900m
Brigantine BG Shell SNS Kroonberg Ampelmann 19.500m
Brigantine BR Shell SNS Kroonberg Ampelmann 19.500m
Carrack QA NAM SNS Kroonberg Ampelmann 18.900m
Perla field Cardon IV Gulf of Venezuela Boa Deep C Ampelmann 18.100m
ckunte /
Created Jun 16, 2019
DDNS setup for IP refresh using DNSimple
# setup in /etc/anacrontab:
# 1 5 ping.daily /home/ckunte/.ddns/
TOKEN="<add token here>" # The API v2 OAuth token
ACCOUNT_ID="<add id here>" # Replace with your account ID
ZONE_ID="<add domain name here>" # The zone ID is the name of the zone (or domain)
RECORD_ID="<add record id here>" # Replace with the DNS Record ID (corresponds to A record)
IP=`curl -s`
ckunte /
Created Jun 16, 2019
Purge LaTeX compile files
#!/usr/bin/env bash
echo -n "Purge LaTeX compile files.."
find ~/. -name "*.log" -type f -delete
find ~/. -name "*.out" -type f -delete
find ~/. -name "*.aux" -type f -delete
find ~/. -name "*.gz" -type f -delete
echo "done."
ckunte / 2019-wa.ics
Last active Apr 14, 2019
WA 2019-21 Holidays
View 2019-wa.ics
SUMMARY:WA: Good Friday
SUMMARY:WA: Easter Monday
ckunte / wcrest.csv
Last active Jan 30, 2019
Wave crest heights
View wcrest.csv
Platform Storm wave crest (m) Abnormal wave crest (m) Remarks
Angel 18.0 23.0 Abnormal => 2000-y return period
Crux 14.0 18.0/22.0 Abnormal => 1000-y/10000-y return period
NR2 16.0 21.0/22.0 Abnormal => 2000-y/10000-y return period
Pohokura N.A. 16.0 Abnormal => 1000-y return period
Pearl 6.0 8.0 Abnormal => 10000-y return period
ckunte / ea-chain.png
Last active Dec 4, 2018
Stud and Studless Chain stiffnesses per DNVGL-OS-E301 (2018)
ckunte /
Last active Jul 12, 2019
Sending bad sites to a kitchen sink (updating hosts file)
#!/usr/bin/env bash
curl -s | sed 's/^||//' > /etc/hosts
ckunte / pro_form.tex
Created Mar 13, 2018
Pro. membership form
View pro_form.tex
\documentclass[a4paper,12pt]{article} % Page size
\usepackage[pdftex,bookmarks,colorlinks,pdfusetitle]{hyperref} % Document properties, etc.
\def\LayoutTextField#1#2{#2} % override default in hyperref
\def\lbl#1{\hbox to 5cm{#1\dotfill\strut}}%
You can’t perform that action at this time.