Skip to content

Instantly share code, notes, and snippets.

View marcinczenko's full-sized avatar
💭
https://idbox.online

Marcin Czenko marcinczenko

💭
https://idbox.online
View GitHub Profile
@marcinczenko
marcinczenko / Open iterm tab here
Last active December 19, 2015 17:02 — forked from eric-hu/Open iterm tab here
Apple script to open an iterm2 tab from right-clicking on a file or folder in Finder.To use:(1) Open Automator(2) Create a new service(3) Change "Service receives selected" drop downs to "Files or folders" in "Finder"(4) Select "Run applescript" from the sidebar, then paste this script in and save
-- Adapted from these sources:
-- http://peterdowns.com/posts/open-iterm-finder-service.html
-- https://gist.github.com/cowboy/905546
-- https://gist.github.com/eric-hu/5846890
-- Modified to work with files as well, cd-ing to their container folder
-- Modified to do an ls -l if the selected item in Finder is a file so that you get the name of the file waiting for you in the terminal.
on run {input, parameters}
tell application "Finder"
set my_file to first item of input
@marcinczenko
marcinczenko / TimestampUtils.java
Created November 26, 2015 19:15 — forked from kristopherjohnson/TimestampUtils.java
Methods for generating ISO 8601 timestamps in Java/Android
package net.kristopherjohnson.util;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
/**
* Methods for dealing with timestamps