git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| # Transparency in Webkit and Gtk. | |
| from gi.repository import Gtk, Gdk, GLib, WebKit | |
| transparent_window_style_provider = Gtk.CssProvider() | |
| transparent_window_style_provider.load_from_data(""" | |
| GtkWindow { | |
| background-color: rgba(100,100,0,0); | |
| background-image: none; |
| public static void postNewComment(Context context,final UserAccount userAccount,final String comment,final int blogId,final int postId){ | |
| mPostCommentResponse.requestStarted(); | |
| RequestQueue queue = Volley.newRequestQueue(context); | |
| StringRequest sr = new StringRequest(Request.Method.POST,"http://api.someservice.com/post/comment", new Response.Listener<String>() { | |
| @Override | |
| public void onResponse(String response) { | |
| mPostCommentResponse.requestCompleted(); | |
| } | |
| }, new Response.ErrorListener() { | |
| @Override |
| # taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
| # generate server.xml with the following command: | |
| # openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
| # run as follows: | |
| # python simple-https-server.py | |
| # then in your browser, visit: | |
| # https://localhost:4443 | |
| import BaseHTTPServer, SimpleHTTPServer | |
| import ssl |
| <?php | |
| // Don't forget to install URL_to_Absolute | |
| // Found at http://www.electrictoolbox.com/examples/url_to_absolute.zip | |
| function get_biggest_img($url){ | |
| require_once('simple_html_dom.php'); // PHP Simple HTML DOM Parser. | |
| require_once('url_to_absolute/url_to_absolute.php'); // get image absolute url. | |
| // options | |
| $biggestImage = 'path to "no image found" image'; // Is returned when no images are found. |
| -vf "pad=ih*16/9:ih:(ow-iw)/2:(oh-ih)/2,scale=640:360" |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| /* | |
| ____ _____ | |
| /\__ \ /\ ___\ | |
| \/__/\ \ \ \ \__/_ | |
| \ \ \ \ \____ \ | |
| _\_\ \ \/__/_\ \ | |
| /\ _____\ /\ _____\ | |
| \/______/ \/______/ | |
| Copyright (C) 2011 Joerg Seebohn |
| #!/usr/bin/env python | |
| # found on <http://files.majorsilence.com/rubbish/pygtk-book/pygtk-notebook-html/pygtk-notebook-latest.html#SECTION00430000000000000000> | |
| # simple example of a tray icon application using PyGTK | |
| import gtk | |
| def message(data=None): | |
| "Function to display messages to the user." | |