- We are using:
- Cordova v4.3.0
- jQuery Mobile v1.4.5
- We would like page transitions to be animated nicely
- Android 4.1 doesn't play ball
- We use the standard jQuery Mobile pages with fixed header, and we've disabled tap toggle
- We find that we get 2 problems
- White flashes, flickering, in between the page transitions
- Also the content of the page gets pushed underneath the fixed header, when we remove previously inserted pages (we do this to deal with memory / performance issues)
- And user is able to tap hold and prompt up the user selection options / widgets, i.e. copy and paste
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
_getCookie = null; | |
$(function () { | |
// *** CSRF starts | |
// ref: https://docs.djangoproject.com/en/1.6/ref/contrib/csrf/#ajax | |
// ---------------------------------------------------- | |
function getCookie(name) { | |
var cookieValue = null; | |
if (document.cookie && document.cookie != '') { | |
var cookies = document.cookie.split(';'); |
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
"""Delete domain permission from your Google Drive files. | |
The reason why I created this script is so that I can use this script to | |
recursively remove the domain permission item from all files. | |
By default, Google Drive will share files to all users in the domain (this | |
setting is recognised as the domain permission type for the file in | |
Google Drive). I don't really want certain files to be shared this way, but | |
there is no easy way recursively fix this in Google Drive, so that is why | |
this script is created. |
- Login to https://developer.apple.com/
- Click on iOS Dev Center
- Click on Certificates, Identifiers & Profiles
- Ensure that there is:
- Under Certificates (Production), a certificate for iOS Distribution
- To create a Certificate (Signing Identity), one needs to create a Certificate Signing Request
- You can do this with Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority
- Under Certificates (Production), a certificate for iOS Distribution
- The Certificate comes with private key and public key, normally the private key would be stored in the machine that generated the initial request
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
// tested with casperjs v1.1.0-beta3 and phantomjs v1.9.7 | |
var casper = require('casper').create({ | |
viewportSize: {width: 1024, height: 768} | |
}); | |
casper.start('https://news.ycombinator.com/', function() { | |
this.capture('hackernews-main.pdf'); | |
var links = this.evaluate(function() { | |
var l = document.querySelectorAll("td[class=title] a"); | |
var r = []; |
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
# the following is one way to generate self-signed cert for this test server | |
# openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt | |
from http.server import HTTPServer,SimpleHTTPRequestHandler | |
from socketserver import BaseServer | |
import ssl | |
HOSTNAME = 'localhost' | |
HTTPS_PORT = 8443 | |
httpd = HTTPServer((HOSTNAME, HTTPS_PORT), SimpleHTTPRequestHandler) | |
httpd.socket = ssl.wrap_socket(httpd.socket, keyfile='server.key', certfile='server.crt', server_side=True) |
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
; run the script in interactive gimp batch mode | |
; i.e.: | |
; $ gimp -i -b - | |
; copy and paste the following into the interactive shell | |
; do note that the code is Scheme, so you got to learn a new language ;) | |
(define (ccm-colorify filename | |
color) | |
(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) | |
(drawable (car (gimp-image-get-active-layer image)))) |
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
from BeautifulSoup import BeautifulSoup | |
from urllib2 import build_opener | |
from os import path | |
HMSUB_SESSION_COOKIE = 'XXX' | |
o = build_opener() | |
o.addheaders.append( | |
('Cookie', '_hmsub_session=%s' % HMSUB_SESSION_COOKIE), | |
) |
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
\documentclass[a4paper,10pt]{article} | |
\usepackage[margin=1.2cm]{geometry} | |
\usepackage{graphicx} | |
\pagestyle{empty} | |
\renewcommand{\familydefault}{\sfdefault} | |
\usepackage{eso-pic} | |
\newcommand\BackgroundPic{% | |
\put(0,0){% | |
\parbox[b][\paperheight]{\paperwidth}{% | |
\vfill |
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
diff --git a/src/gridfs.c b/src/gridfs.c | |
index f51b397..66f8d88 100644 | |
--- a/src/gridfs.c | |
+++ b/src/gridfs.c | |
@@ -43,7 +43,7 @@ int gridfs_init( mongo *client, const char *dbname, const char *prefix, | |
int options; | |
bson b; | |
- bson_bool_t success; | |
+ bson_bool_t success = 1; |
NewerOlder