from datetime import datetime
timestamp = datetime.utcnow().strftime('%Y-%m-%dT%H-%M-%S')
# '2020-03019T19-53-07'
timestamp <- format(Sys.time(), format="%FT%H-%M-%S", tz="UTC")
#!/bin/bash | |
mkdir ~/.ssh | |
touch ~/.ssh/authorized_keys | |
touch ~/.ssh/known_hosts | |
cat <<EOF > ~/.ssh/config | |
Host * | |
User ${USER} | |
IdentityFile ~/.ssh/host.key |
import java.lang.System | |
import java.util.TreeMap | |
import java.util.Comparator | |
def env = new TreeMap<String, String>(System.getenv()).toSorted(new Comparator<Map.Entry<String, String>>() { | |
@Override | |
int compare(Map.Entry<String, String> entry1, Map.Entry<String, String> entry2) { | |
return entry1.key <=> entry2.key | |
} | |
}) |
# Use ${idea.home.path} macro to specify location relative to IDE installation home. | |
# Use ${xxx} where xxx is any Java property (including defined in previous lines of this file) to refer to its value. | |
# Note for Windows users: please make sure you're using forward slashes: C:/dir1/dir2. | |
ide.app.name=webstorm | |
ide.config.home=${user.home}/.jetbrains/${ide.app.name} | |
#--------------------------------------------------------------------- | |
# Uncomment this option if you want to customize a path to the settings directory. | |
#--------------------------------------------------------------------- | |
idea.config.path=${ide.config.home}/config |
const SI = { | |
UNITS: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], | |
BASE: 1024 | |
} | |
function calculateFileDisplayLength(bytes){ | |
const units = SI.UNITS | |
const base = SI.BASE | |
let magnitude = 0; | |
let accuracy = 0 | |
let unit = units[magnitude] |
BEGIN:VCALENDAR | |
VERSION:2.0 | |
CALSCALE:GREGORIAN | |
BEGIN:VEVENT | |
SUMMARY:Pay Day | |
DESCRIPTION:This happens on the 15th and last day of the month, forever. | |
STATUS:CONFIRMED | |
SEQUENCE:0 | |
DTSTART;VALUE=DATE:20190515 | |
RRULE:FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=15,-1 |
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
<?xml version="1.0" encoding="UTF-8"?> | |
<schema version="1.0" xmlns="http://www.apple.com/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.apple.com/metadata file:///System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Resources/MetadataSchema.xsd"> | |
<!-- | |
Compiled from /Applications/Microsoft\ Outlook.app/Contents/Library/Spotlight/Microsoft\ Outlook\ Spotlight\ Importer.mdimporter/Contents/Resources/schema.xml | |
with info from http://xensoft.com/search-mac-outlook-2011-mail-with-raw-queries/ | |
--> | |
<types> | |
<type name="com.microsoft.outlook15.contact"> | |
<allattrs> | |
kMDItemTitle |
var div = document.createElement('div'); | |
var result; | |
div.innerHTML = $('.tpSubtitleRegion_speaker .gwt-HTML').prop('innerHTML'); | |
result = document.evaluate("//text()", div, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
for(var i=0; i < result.snapshotLength; i++) { | |
console.dir(result.snapshotItem(i)); | |
} |
# A xterm-256color based TERMINFO that adds the escape sequences for italic. | |
# | |
# Install: | |
# | |
# tic xterm-256color-italic.terminfo | |
# | |
# Usage: | |
# | |
# export TERM=xterm-256color-italic | |
# |