Skip to content

Instantly share code, notes, and snippets.

View temnoregg's full-sized avatar

Petr Chalupny temnoregg

View GitHub Profile
@jrsmith3
jrsmith3 / sla2pdf.py
Created March 12, 2014 01:31
Converts every scribus document to a PDF in a specified directory.
"""
Convert every .sla to a pdf in a specified directory.
This script can only be run from within [scribus](http://http://scribus.net).
"""
import os
work_dir = #you have to explicitly tell scribus where your working directory is.
filenames = os.listdir(work_dir)
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@deyvin
deyvin / get_remote_file_titanium_mobile.js
Created March 27, 2012 13:45
Get remote file with Titanium Mobile
function get_remote_file(filename, url, fn_end, fn_progress ) {
Ti.API.info("[filename]" + filename);
Ti.API.info("[url]" + url);
var file_obj = {file:filename, url:url, path: null};
var file = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,filename);
if ( !file.exists() ) {
@fermion
fermion / apns.py
Created March 2, 2012 12:35 — forked from scotttam/apns.py
Sends an Apple Push Notification with Python
import socket, ssl, json, struct
import binascii
# device token returned when the iPhone application
# registers to receive alerts
deviceToken = '39cac56f 986a0e66 3c4fd4f4 68df5598 024d2ca3 8b9f307c 741c180e 9fc30c62'
thePayLoad = {
'aps': {
'alert':'Oh no! Server\'s Down!',
@starenka
starenka / copywriter.py
Created June 1, 2011 16:46
Become a copywriter w/ NTLK
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# generates text based on sample text
#
# @author: starenka
# @email: 'moc]tod[liamg].T.E[0aknerats'[::-1]
# @version: 1.0.3
# @since 6/1/11
# @depends nltk, BeautifulSoup
@irohiroki
irohiroki / gist:909284
Created April 8, 2011 04:27
jQuery Mobile Red theme for Buttons
.ui-btn-up-f, .ui-btn-hover-f, .ui-btn-down-f {
color: white;
font-weight: bold;
text-decoration: none; }
.ui-btn-up-f {
border: 1px solid #711414;
background: #ab2525;
text-shadow: 0 -1px 1px #711414;
background-image: -moz-linear-gradient(top, #c44f4f, #ab2525);