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 python3 | |
# coding=utf-8 | |
import sys | |
import re | |
import os | |
import shutil | |
if len(sys.argv) < 2: |
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
// Playground - noun: a place where people can play | |
import UIKit | |
var d1 = Dictionary<String, NSMutableArray>() | |
var d2 = Dictionary<String, String[]>() | |
d1["A"] = NSMutableArray(object: "A1") | |
d1 // ["A": ["A1"]] |
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
Automator > Service | |
=================== | |
* Put the code bellow inside a "Run Shell Script" action | |
** Change the paths to TTYtter and growl | |
** TTYtter: http://www.floodgap.com/software/ttytter/ | |
** growl.sh: http://hints.macworld.com/dlfiles/growl_sh.txt | |
cat > ~/Library/Caches/tn.cache | |
AAA=`wc -m ~/Library/Caches/tn.cache | awk '{print $1}'` |
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
tell application "System Events" | |
if (name of processes) contains "Adium" then | |
tell application "Adium" | |
set acc to (some account whose name is "#####") | |
tell acc | |
set enabled to true | |
go online | |
end tell | |
end tell | |
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
set theScript to quoted form of POSIX path of (path to resource "compositeImages.py" in directory "Scripts") | |
on open these_items | |
set theScript to quoted form of POSIX path of (path to resource "compositeImages.py" in directory "Scripts") | |
set f1 to (quoted form of POSIX path of (first item of these_items)) | |
set f2 to (quoted form of POSIX path of (item 2 of these_items)) | |
choose file name with prompt "Destination:" default name "Images.png" without invisibles | |
set theFile to quoted form of POSIX path of result |
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
// | |
// JKInterpolationMath.h | |
// | |
// Created by Carlos Fonseca on 08/11/15. | |
// Copyright © 2015 Carlos Fonseca. All rights reserved. | |
// | |
import Foundation | |
func JKLinearInterpolation(t:Float, start:Float, end:Float) -> Float |
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 python | |
import codecs | |
from bs4 import BeautifulSoup | |
import sys | |
contents = open(sys.argv[1]).read() | |
soup = BeautifulSoup(contents, features="xml") | |
allLineStrings = soup.find_all("LineString") |
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 | |
# -*- coding: utf-8 -*- | |
import math | |
import sys | |
from bs4 import BeautifulSoup | |
def distance_on_unit_sphere(lat1, long1, lat2, long2): | |
# Convert latitude and longitude to |
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 python | |
# -*- coding: utf-8 -*- | |
import json | |
import codecs | |
import sys | |
import locale | |
from subprocess import Popen, PIPE, STDOUT | |
import argparse |
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
package com.example.SectionedAdapterTest; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.Adapter; | |
import android.widget.BaseAdapter; | |
import java.util.ArrayList; | |
import java.util.List; | |
abstract public class SectionedAdapter extends BaseAdapter { |
OlderNewer