Skip to content

Instantly share code, notes, and snippets.

View dijeferson's full-sized avatar
🚀
Developing Great Software!

Jeferson Dos Santos dijeferson

🚀
Developing Great Software!
View GitHub Profile
tell application "Finder"
try
set appPath to (path to application "Evernote" as text)
on error
display dialog "Couldn't find Evernote. Is it installed?"
end try
set printPath to (path to "dlib" from user domain as text) & "PDF Services"
make new alias at printPath to appPath with properties {name:"Send PDF to Evernote"}
end tell
# -*- coding: utf-8 -*-
import feedparser, webbrowser, urllib, console, sys
selected = "no"
notes = ""
try:
notes = sys.argv[2]
except:
pass
console.clear()
feedURL="http://letterboxd.com/YOURUSERNAME/rss" # Insert your letterboxd username
@dijeferson
dijeferson / gist:b7ac596c8467a9c6d3a0
Created July 7, 2014 14:51
Map photos using exif data
import photos
import webbrowser
query = 'safari-http://maps.apple.com/?q=%s,%s'
img = photos.pick_image(include_metadata=True)
meta = img[1]
gps = meta.get('{GPS}')
# FontInstaller (by @olemoritz)
# This script installs a custom TTF font on iOS (system-wide).
# It can be used in one of two ways:
# 1. Simply run it in Pythonista, you'll be prompted for the URL of the font
# you'd like to install (if there's a URL in the clipboard, it'll be used by default)
# 2. Use it as an 'Open in...' handler, i.e. select this file in Pythonista's 'Open in...
# menu' setting. This way, you can simply download a ttf file in Safari and open it in
# IMPORTANT SETUP INSTRUCTIONS:
#
# 1. Go to http://www.dropbox.com/developers/apps (log in if necessary)
# 2. Select "Create App"
# 3. Select the following settings:
# * "Dropbox API app"
# * "Files and datastores"
# * "(No) My app needs access to files already on Dropbox"
# * "All file types"
# * (Choose any app name)
# This script adds a "Webclip" shortcut to your homescreen.
# The shortcut can be used to open a web page in full-screen mode,
# or to launch a custom URL (e.g. a third-party app).
# You'll be asked for a title, a URL, and an icon (from your camera roll)
import plistlib
import BaseHTTPServer
import webbrowser
import uuid
from io import BytesIO
{
"_id": "4629aa09a21c90b25eda70768d945e36",
"event_id": "7ff54e94ec6b064f0ead00c2ff0c37e6",
"code": "1234",
"status": "active",
"rsvp_status": "pending",
"rsvp_date": "null",
"validation_date": "null",
"people":
[
{
"_id": "7ff54e94ec6b064f0ead00c2ff0c37e6",
"name": "Aniversário da Olivia",
"description": null,
"date": "2015-11-20",
"time_start": "11:00",
"time_end": "17:00",
"location":
{
"name":"Sítio Nova Amsterdam",
@dijeferson
dijeferson / valida_cnpj.sql
Created July 20, 2015 21:19
Validação de CNPJ em SQL
-- ================================================================
-- Author: Jeferson Santos
-- Create date: 07/12/2006
-- Description: Valida um numero de CNPJ
-- Parameters: @CNPJ varchar(14)- Numero de CNPJ a ser Verificado
-- ================================================================
CREATE FUNCTION f_VerificaCNPJ (@CNPJ varchar(14))
RETURNS varchar(14)
AS
@dijeferson
dijeferson / ParseJsonToCSharp.py
Last active September 22, 2015 16:58
A simple script to convert a json structure to csharp class with NewtonSoft json annotations, and correct casing.
# ParseJsonToCSharp
# A simple script to convert a json structure to csharp class with NewtonSoft json annotations, and correct casing.
# Author: Jeferson Santos (@dijeferson)
# Date: Sept 21st 2015
NAMESPACE_NAME = 'NamespaceHere'
CLASS_NAME = 'NomeDaClasse'
INPUT_FILE_PATH = 'c:/tmp/input.json'
OUTPUT_FILE_PATH = 'c:/tmp/output.cs'