Skip to content

Instantly share code, notes, and snippets.

View alessaba's full-sized avatar

Alessandro Saba alessaba

  • Italy
  • 21:46 (UTC +01:00)
View GitHub Profile
@alessaba
alessaba / pdf_pwd_rm.py
Last active November 16, 2017 17:17
Pythonista Unlock PDF
###############################
# Script made by @ivanmorenoz with a small secure correction from @filippoclaudi #
###############################
# Description: this script uses Pythonista Objc Bridging for unlocking the PDF using PDFKit
from objc_util import ObjCClass, nsurl
from appex import get_file_paths, finish, is_running_extension
from os import remove, path
from console import alert, input_alert, quicklook
typedef enum _UIBackgroundStyle {
UIBackgroundStyleDefault,
UIBackgroundStyleTransparent,
UIBackgroundStyleLightBlur,
UIBackgroundStyleDarkBlur,
UIBackgroundStyleDarkTranslucent
} UIBackgroundStyle;
@interface UIApplication (UIBackgroundStyle)
-(void)_setBackgroundStyle:(UIBackgroundStyle)style;
@alessaba
alessaba / gist:6173177
Last active December 20, 2015 18:08 — forked from jwt2d/gist:6120070
# Launcher
#
# A Simple Launcher in Notification Center
from scene import *
import webbrowser,console,notification
#----------Launcher Settings---------------
key_names = [[['GChrome','googlechrome:'],
['Keeper','keeper:']],
[['Calculator','calculatorinfinity:']],
import urllib2, urlparse, sys, webbrowser
itags = {'45': 'webm_720p',
'44': 'webm_480p',
'43': 'webm_360p',
'38': 'mp4_3072p',
'37': 'mp4_1080p',
'36': 'phone_mp4_240p',
'35': 'flv_480p',
'34': 'flv_360p',
import os, os.path, sys, urllib2, requests
class PyPiError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
def _chunk_report(bytes_so_far, chunk_size, total_size):
if (total_size != None):
# File Transfer for Pythonista
# ============================
# This script allows you to transfer Python files from
# and to Pythonista via local Wifi.
# It starts a basic HTTP server that you can access
# as a web page from your browser.
# When you upload a file that already exists, it is
# renamed automatically.
# From Pythonista's settings, you can add this script
# to the actions menu of the editor for quick access.
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
#21modified: index.php
# modified: wp-config.php
# modified: wp-content/plugins/advanced-custom-fields/core/controllers/options_page.php
# modified: wp-content/plugins/advanced-custom-fields/core/controllers/settings.php
# modified: wp-content/plugins/advanced-custom-fields/core/fields/page_link.php