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
ckunte / nd.sh
Created Jul 14, 2019
Count days from start to end dates
View nd.sh
#!/usr/bin/env bash
# nd.sh -- count days from start to end dates input inline
# 2019 ckunte
if [ -z "$*" ]; then
echo 'Include "start" "end" dates inline, e.g.,'
echo '$ bash nd.sh "1 Apr 2018" "31 Dec 2018"'
exit 0
fi
start_date=$1
end_date=$2
@ckunte
ckunte / fhm.sh
Created Jul 12, 2019
Fix apt-get hash sum mismatch
View fhm.sh
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
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
ckunte / ddns.sh
Created Jun 16, 2019
DDNS setup for IP refresh using DNSimple
View ddns.sh
#!/bin/bash
#
# setup in /etc/anacrontab:
# 1 5 ping.daily /home/ckunte/.ddns/ddns.sh
#
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 http://icanhazip.com/`
@ckunte
ckunte / purge.sh
Created Jun 16, 2019
Purge LaTeX compile files
View purge.sh
#!/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
ckunte / 2019-wa.ics
Last active Apr 14, 2019
WA 2019-21 Holidays
View 2019-wa.ics
BEGIN:VCALENDAR
PRODID:-//Hol2Ics//EN
BEGIN:VEVENT
SUMMARY:WA: Good Friday
DTSTART;VALUE=DATE:20190419
DTEND;VALUE=DATE:20190420
END:VEVENT
BEGIN:VEVENT
SUMMARY:WA: Easter Monday
DTSTART;VALUE=DATE:20190422
@ckunte
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
ckunte / ea-chain.png
Last active Dec 4, 2018
Stud and Studless Chain stiffnesses per DNVGL-OS-E301 (2018)
@ckunte
ckunte / hup.sh
Last active Jul 12, 2019
Sending bad sites to a kitchen sink (updating hosts file)
View hup.sh
#!/usr/bin/env bash
curl -s https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts | sed 's/^||//' > /etc/hosts
@ckunte
ckunte / pro_form.tex
Created Mar 13, 2018
Pro. membership form
View pro_form.tex
\documentclass[a4paper,12pt]{article} % Page size
\usepackage{geometry}\geometry{margin=1.0in}
\usepackage[pdftex,bookmarks,colorlinks,pdfusetitle]{hyperref} % Document properties, etc.
\usepackage{xcolor}
\hypersetup{linkcolor=blue,citecolor=magenta,filecolor=black,urlcolor=blue}
\newdimen\longline
\longline=\textwidth\advance\longline-5cm
\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.