Skip to content

Instantly share code, notes, and snippets.

View NaanProphet's full-sized avatar

Krishna Bhamidipati NaanProphet

View GitHub Profile
@n8henrie
n8henrie / lcp_export.py
Last active November 27, 2016 23:51
Extracts URL schemes from a Launch Center Pro backup file to a json file, in order to facilitate batch editing on a computer. Also creates an updated backup file after modification of the json.
#! /usr/bin/env python3
'''lcp_export.py
Extracts URL schemes from a Launch Center Pro backup file to a
json file, in order to facilitate batch editing on a computer. Also
creates an updated backup file after modification of the json.
python3 lcp_export.py --help
Details: http://n8h.me/1meUxTi
'''
import re
@RichardHyde
RichardHyde / gist:3386ac57b55455b71140
Last active June 21, 2020 09:09
Convert a date string to a date in Applescript
-- Convert date function. Call with string in YYYY-MM-DD HH:MM:SS format (time part optional)
to convertDate(textDate)
set resultDate to the current date
set the month of resultDate to (1 as integer)
set the day of resultDate to (1 as integer)
set the year of resultDate to (text 1 thru 4 of textDate)
set the month of resultDate to (text 6 thru 7 of textDate)
set the day of resultDate to (text 9 thru 10 of textDate)
set the time of resultDate to 0
@benwaldie
benwaldie / 2014-04-03 Send Keynote Presenter Notes to Evernote.applescript
Created April 3, 2014 14:14
This script sends presenter notes from a Keynote 6.2 presentation to Evernote.
--==============================
-- Send Keynote Presenter Notes to Evernote
-- Version 1.0.1
-- Written By: Ben Waldie <ben@automatedworkflows.com>
-- http://www.automatedworkflows.com
-- Version 1.0.0 - Initial release
-- Version 1.0.1 - Updated for Keynote 6.2 compatibility
--==============================
@nicolashery
nicolashery / environment-variables-jekyll-templates.md
Last active January 22, 2023 15:56
Make environment variables available in Jekyll Liquid templates

Environment variables in Jekyll templates

This is one way to pass some data (API tokens, etc.) to your Jekyll templates without putting it in your _config.yml file (which is likely to be committed in your GitHub repository).

Copy the environment_variables.rb plugin to your _plugins folder, and add any environment variable you wish to have available on the site.config object.

In a Liquid template, that information will be available through the site object. For example, _layouts/default.html could contain:

@zpao
zpao / code_highlight_lines.rb
Created May 10, 2013 20:19
Highlight specific lines of code with Markdown + Jekyll + Redcarpet
# Replace Jekyll's handling of the Redcarpet code_block (which already adds
# support for highlighting, but needs support for the very non-standard
# "code fences with line highlights" extension).
# Since this is currently depending on Redcarpet to cooperate, we are going to
# be naive, and only allow line highlighting when a language is specified. If
# you don't want any syntax highlighting but want to highlight lines, then you
# need to specify text as your language (or it will break), like:
# ```text{4}
module Jekyll
@abevoelker
abevoelker / PS3.plist
Created May 27, 2012 14:37
HandBrake Xbox 360 / PS3 preset from version 0.93
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>AudioList</key>
<array>
<dict>
<key>AudioBitrate</key>
<string>160</string>
@henrik
henrik / ocr.markdown
Created March 3, 2012 17:07
OCR on OS X with tesseract

Install ImageMagick for image conversion:

brew install imagemagick

Install tesseract for OCR:

brew install tesseract --all-languages

Or install without --all-languages and install them manually as needed.

@andrewbunday
andrewbunday / compressor.py
Created March 1, 2012 16:48
This is how little I trust Compressor's Command Line Interface.
#!/usr/bin/env python
"""
Compressor wrapper script.
"""
import os
import sys
import re
import argparse
import subprocess
import logging
@rwest
rwest / README
Created January 9, 2012 16:42 — forked from symposion/README
Convert OS X Keychain exported entries into logins for 1Password import
These two files should help you to import passwords from mac OS X keychains to 1password.
Assumptions:
1) You have some experience with scripting/are a power-user. These scripts worked for me
but they haven't been extensively tested and if they don't work, you're on your own!
Please read this whole document before starting this process. If any of it seems
incomprehensible/frightening/over your head please do not use these scripts. You will
probably do something Very Bad and I wouldn't want that.
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they
@jehiah
jehiah / simple_args_parsing.sh
Created March 4, 2011 16:56
a simple way to parse shell script arguments
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"