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 popplerqt4 | |
import sys | |
import PyQt4 | |
def main(): | |
doc = popplerqt4.Poppler.Document.load(sys.argv[1]) | |
total_annotations = 0 | |
for i in range(doc.numPages()): |
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 | |
echo "*** SVG 2 ICNS ***" | |
if [ $# -ne 1 ]; then | |
echo "Usage: svg2icns filename.svg" | |
exit 100 | |
fi | |
filename="$1" | |
name=${filename%.*} | |
ext=${filename##*.} | |
echo "processing: $name" |
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/python | |
# smartcrop with libvips, based very roughly on | |
# https://github.com/jwagner/smartcrop.js | |
import sys | |
import gi | |
gi.require_version('Vips', '8.0') | |
from gi.repository import Vips |
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/python | |
import sys | |
from gi.repository import Vips | |
N_BINS = 10 | |
BIN_SIZE = 256 / N_BINS | |
im = Vips.Image.new_from_file(sys.argv[1], access = Vips.Access.SEQUENTIAL) |
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 <AWSS3/AWSS3.h> | |
//#import <AWSRuntime/AWSRuntime.h> | |
//import those in your .h file and | |
//add the awss3 and awsruntime framework from the client | |
//download from Amazon | |
AmazonS3Client *s3Client = [[AmazonS3Client alloc] initWithAccessKey:@"Key_Goes_here" withSecretKey:@"Secret_Goes_Here"]; | |
NSString *imageName = [NSString stringWithFormat:@"%@.png", @"cpa"]; |
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 java.util.LinkedList; | |
public class LevenshteinDistance { | |
public static final int NONE = 0; | |
public static final int DELETE = 1; | |
public static final int INSERT = 2; | |
public static final int CHANGE = 3; | |
private static int minimum(int a, int b, int c) { |
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
require 'pdf-reader' | |
require './markup_receiver' | |
doc = PDF::Reader.new(ARGV[0]) | |
$objects = doc.objects | |
def is_note?(object) | |
object[:Type] == :Annot && [:Text, :FreeText].include?(object[:Subtype]) | |
end |
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 static org.junit.Assert.*; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.util.Properties; | |
import org.apache.lucene.analysis.core.WhitespaceAnalyzer; | |
import org.apache.lucene.analysis.standard.StandardAnalyzer; | |
import org.apache.lucene.document.Document; |
Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.
As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.
Here's how to get it set up on Mac OS X:
-
OpenConnect can be installed via homebrew:
brew update
brew install openconnect
NewerOlder