(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )
git config --global user.name "Fernando Guillen"
git config --global user.email "fguillen.mail+spam@gmail.com"
cd /develop/myrepo
| <?php | |
| function strip_word_html($text, $allowed_tags = '<b><i><sup><sub><em><strong><u><br>') | |
| { | |
| mb_regex_encoding('UTF-8'); | |
| //replace MS special characters first | |
| $search = array('/‘/u', '/’/u', '/“/u', '/”/u', '/—/u'); | |
| $replace = array('\'', '\'', '"', '"', '-'); | |
| $text = preg_replace($search, $replace, $text); | |
| //make sure _all_ html entities are converted to the plain ascii equivalents - it appears | |
| //in some MS headers, some html entities are encoded and some aren't |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!--Google Weather API Conditions. Compiled by Dennis Delimarsky, http://dennisdel.com/content/conditions.xml--> | |
| <!--Tweaked by Brian Zerangue, February 1, 2011--> | |
| <conditions> | |
| <type handle="partly-sunny">Partly Sunny</type> | |
| <type handle="scattered-thunderstorms">Scattered Thunderstorms</type> | |
| <type handle="showers">Showers</type> | |
| <type handle="scattered-showers">Scattered Showers</type> | |
| <type handle="rain-and-snow">Rain and Snow</type> | |
| <type handle="overcast">Overcast</type> |
| /** | |
| * We're going to create an infinite loading table view. Whenever you get close to the bottom, we'll load more rows. | |
| */ | |
| var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); | |
| var isAndroid = Ti.Platform.osname === 'android'; | |
| /** | |
| * Create our UI elements. | |
| */ | |
| var table = Ti.UI.createTableView({ top: 0, right: 0, bottom: 0, left: 0 }); |
| import zmq | |
| import threading | |
| import time | |
| from random import choice | |
| class ClientTask(threading.Thread): | |
| """ClientTask""" | |
| def __init__(self): | |
| threading.Thread.__init__ (self) |
| // This is the Android version of the Tweetie-like pull to refresh table: | |
| // http://developer.appcelerator.com/blog/2010/05/how-to-create-a-tweetie-like-pull-to-refresh-table.html | |
| var win = Ti.UI.currentWindow; | |
| var alertDialog = Titanium.UI.createAlertDialog({ | |
| title: 'System Message', | |
| buttonNames: ['OK'] | |
| }); | |
| var scrollView = Ti.UI.createScrollView({ |
| using System; | |
| using System.IO; | |
| using System.Net; | |
| using System.Text; | |
| using System.Text.RegularExpressions; | |
| using System.Web; | |
| namespace ConsoleApplication1 | |
| { | |
| class Program |
| class BaseRequestHandler(tornado.web.RequestHandler): | |
| """Base class for all SimpleGeo request handlers.""" | |
| def _handle_request_exception(self, e): | |
| status_code = getattr(e, 'status_code', 500) | |
| self.set_status(status_code) | |
| error = { | |
| 'code' : status_code, | |
| 'message' : str(e) |
| (function(window, document) { | |
| // The end user should be allowed to disable synchronization. This button | |
| // is optional on the page | |
| var syncAllow = true; | |
| var syncButton = document.querySelector('.sync-button'); | |
| // If the sync button exists bind a click event and toggle the syncAllow | |
| // boolean. Set the value of the button. | |
| if(syncButton) { |
| # This is 4x faster: | |
| error = " ".join(["Unknown filename:", filename]) | |
| # Than this: | |
| error = "Unknown filename: {0}".format(filename) # My preferred way... | |
| # And 2x faster than this: | |
| error = "Unknown filename: " + filename |