Skip to content

Instantly share code, notes, and snippets.

View karlili's full-sized avatar
🦄

poppysmickarlili karlili

🦄
  • Scotland
  • 12:31 (UTC)
View GitHub Profile
@karlili
karlili / csd-wrapper.sh
Created March 24, 2021 20:35 — forked from l0ki000/csd-wrapper.sh
Cisco Anyconnect CSD wrapper for OpenConnect (exhanced to autodownload and autoupdate hostscan)
#!/bin/bash
# Cisco Anyconnect CSD wrapper for OpenConnect
# Enter your vpn host here
CSD_HOSTNAME=
if [[ -z ${CSD_HOSTNAME} ]]
then
echo "Define CSD_HOSTNAME with vpn-host in script text. Exiting."
exit 1
fi
@karlili
karlili / getHumanReadableDateDisplay.java
Created June 28, 2011 07:54
Implementation of a human readable date display
/**
* An implementation on getting the human readable date format from milliseconds
* which is commonly used in Facebook, like about x hours ago.
* Convention as follows:
* 1000 milliseconds = 1 second,
* 60 seconds = 1 minute,
* 60 minutes = 1 hour,
* 24 hours = 1 day,
* 12 days = 1 month,
* 12 month = 1 year.