- Go to Tools > New Plugin
- Paste timestamp.py contents and save in User as timestamp.py
- Open Preferences > Key Bindings - User (or Default, your call)
- Paste keybindings.json, or add a line to your keybindings
- Customize the keyboard shortcut to your liking and save
This file contains 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 | |
BACKUP="/tmp/s3/db" | |
DATE=`date +"%Y-%m-%d"` | |
DIR="${BACKUP}/${DATE}/" | |
if [ ! -d $DIR ]; | |
then | |
mkdir -p $DIR | |
fi |
This file contains 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/sh | |
### BEGIN INIT INFO | |
# Provides: mongodb | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the mongodb data-store | |
# Description: starts mongodb using start-stop-daemon |
This file contains 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
#sidebar ul.customers::-webkit-scrollbar { | |
width: 5px; | |
} | |
#sidebar ul.customers::-webkit-scrollbar-thumb:vertical { | |
margin: 5px; | |
background-color: #999; | |
-webkit-border-radius: 5px; | |
} |
This file contains 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
#!/usr/bin/env ruby | |
gem 'celluloid-zmq', '0.15.0' | |
require 'celluloid' | |
require 'celluloid/zmq' | |
class Publisher | |
include Celluloid::ZMQ |
This file contains 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
<?xml version="1.0"?> | |
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"> | |
<channel> | |
<title>Petrolicious</title> | |
<link>https://staging.petrolicious.com</link> | |
<description>Petrolicious is a leading automotive lifestyle brand providing world class short films and tasteful editorial around the world’s finest classic vehicles.</description> | |
<language>en-us</language> | |
<copyright>© Petrolicious / May Moon Media 2018. All Rights reserved.</copyright> | |
<atom:link href="https://staging.petrolicious.com/feed" rel="self" type="application/rss+xml"/> | |
<item> |
This file contains 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
for i in `ls *.svg` | |
rsvg-convert -f pdf -o PDF/${i}.pdf $i |
This file contains 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
# http://www.ruby-doc.org/core-1.9.3/Hash.html#method-i-default_proc-3D | |
h = Hash.new {|hash, key| hash[key] = Hash.new(&hash.default_proc)} | |
h[:foo][:bar][:baz][:bat] = "hello" | |
p h | |
#=> {:foo=>{:bar=>{:baz=>{:bat=>"hello"}}}} |
This file contains 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 Ember from 'ember'; | |
import Utils from 'docket/utils'; | |
import Status from 'docket/models/status'; | |
import User from 'docket/models/user'; | |
export default Ember.Route.extend({ | |
activate: function() { | |
this._super(); | |
// do some setup related to event_source here | |
}, |
This file contains 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
adjust_by = 48 # seconds | |
srt = File.read(File.expand_path("~/Downloads/EN.srt")) | |
new_srt = srt. | |
split("\r\n\r\n"). | |
map {|s| s.split("\r\n")}. | |
map do |i, times, *values| | |
new_times = times.split(" --> ").map {|t| (Time.strptime(t, "%H:%M:%S,%L") + adjust_by).strftime("%H:%M:%S,%L")}.join(" --> ") |
NewerOlder