This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Solution 1: | |
Timestamp = ConvertToLocalTime(Date(MakeDate(1970, 1, 1) + (<timestamp_field> / 86400)), '<time_zone>') | |
// Solution 2: | |
Timestamp = ConvertToLocalTime(Date(25569 + (<timestamp_field> / 86400)), '<time_zone>') | |
// my need | |
ConvertToLocalTime(Date(MakeDate(1970, 1, 1) + (epoch_ts / 86400))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get hard drive info | |
wmic logicaldisk get | |
# Quicky create a system image backup | |
wbAdmin start backup -backupTarget:E: -include:C: -allCritical -quiet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# requires exif command line utility | |
shopt -s nocaseglob #find both *.jpg and *.JPG | |
for i in *.JPG; do | |
j=`exif -t 0x9003 "$i" | grep Value: | sed 's/Value://' | sed s/:/-/g | sed s/-/./3 | sed s/-/./3`.jpg | |
mv -i "$i" "$j" | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import requests | |
import time | |
import os,sys | |
MAGIC_FORM_URL = 'http://api.cloudstitch.io/...your_url' | |
def record_wake(): | |
data = { | |
"Timestamp": time.strftime("%Y-%m-%d %H:%M"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# There's a bug in the Android Camera that doesn't set Create Date and Date Time Original in the photo's EXIF meta data, but only when the images are NOT set to HDR+ | |
# The following is fix using exiftool (brew install exiftool) to set these fields | |
# Run these in the terminal in sequence | |
# First fix DateTimeOriginal | |
exiftool "-datetimeoriginal<filemodifydate" -r -if '(not $datetimeoriginal or ($datetimeoriginal eq "0000:00:00 00:00:00")) and ($filetype eq "JPEG")' *.jpg | |
# Then fix CreateDate | |
exiftool "-createdate<datetimeoriginal" -r -if '(not $createdate or ($createdate eq "0000:00:00 00:00:00")) and ($filetype eq "JPEG")' *.jpg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timestamp | temp_f | |
---|---|---|
2017-04-30 13:05:01 | 71.375 | |
2017-04-30 13:10:01 | 71.487 | |
2017-04-30 13:15:01 | 71.487 | |
2017-04-30 13:20:01 | 71.600 | |
2017-04-30 13:25:01 | 71.600 | |
2017-04-30 13:30:01 | 71.600 | |
2017-04-30 13:35:01 | 71.713 | |
2017-04-30 13:40:01 | 71.825 | |
2017-04-30 13:45:01 | 71.825 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timestamp,temp_f | |
2017-04-30 13:05:01,71.375 | |
2017-04-30 13:10:01,71.487 | |
2017-04-30 13:15:01,71.487 | |
2017-04-30 13:20:01,71.600 | |
2017-04-30 13:25:01,71.600 | |
2017-04-30 13:30:01,71.600 | |
2017-04-30 13:35:01,71.713 | |
2017-04-30 13:40:01,71.825 | |
2017-04-30 13:45:01,71.825 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# | |
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set textwidth=79 | |
set expandtab | |
set autoindent | |
set number | |
set fileformat=unix | |
set list | |
set listchars=tab:>- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# install lazy git | |
# https://github.com/jesseduffield/lazygit#ubuntu | |
sudo add-apt-repository ppa:lazygit-team/release | |
sudo apt-get update | |
sudo apt-get install lazygit | |
# install gh cli | |
# https://github.com/cli/cli/blob/trunk/docs/install_linux.md |