-
rev-parse [something]- show the SHA of any weird git phrase
-
hash-object -w [file]- take any file or stdin and return a blob sha
-
ls-tree (-r) [sha] -
show the entries of a git tree in the db
This file contains hidden or 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
| // Here is a proposal for minimalist JavaScript classes, humbly offered. | |
| // There are (at least) two different directions in which classes can be steered. | |
| // If we go for a wholly new semantics and implementation, then fancier classical | |
| // inheritance can be supported with parallel prototype chains for true inheritance | |
| // of properties at both the class and instance level. | |
| // If however, we keep current JavaScript prototype semantics, and add a form that | |
| // can desugar to ES3, things must necessarily stay simpler. This is the direction | |
| // I'm assuming here. |
This file contains hidden or 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
| import requests | |
| import json | |
| class ClickyApi(object): | |
| """ | |
| A simple Python interface for the Clicky web analytics api. | |
| Relies on the Requests library - python-requests.org | |
| Usage: |
This file contains hidden or 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 __future__ import with_statement # we'll use this later, has to be here | |
| from argparse import ArgumentParser | |
| import requests | |
| from BeautifulSoup import BeautifulStoneSoup as Soup | |
| def parse_sitemap(url): | |
| resp = requests.get(url) | |
| # we didn't get a valid response, bail |
This file contains hidden or 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
| !SLIDE bullets incremental transition=fade | |
| .notes something something something something something something something something something something something something something something something dark side | |
| # Second Slide # | |
| * something | |
| * something else | |
| * a third thing | |
| * a fourth thing |
This file contains hidden or 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 django.conf import settings | |
| from django.core.mail import EmailMultiAlternatives | |
| from django.template.defaultfilters import striptags | |
| def send_mail(subject, html_message, from_email, recipient_list, fail_silently=False, connection=None): | |
| text_message = striptags(html_message) | |
| recipient_list = getattr(settings, 'EMAIL_RECIPIENTS_OVERRIDE', recipient_list) | |
| msg = EmailMultiAlternatives(subject, text_message, from_email, recipient_list, connection=connection) | |
| msg.attach_alternative(html_message, "text/html") |
This file contains hidden or 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
| import java.io.File; | |
| import java.io.IOException; | |
| import java.io.PrintWriter; | |
| import org.eclipse.egit.github.core.Download; | |
| import org.eclipse.egit.github.core.RepositoryId; | |
| import org.eclipse.egit.github.core.client.GitHubClient; | |
| import org.eclipse.egit.github.core.service.DownloadService; | |
| /** |
This file contains hidden or 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
| Subject: RE: DPS Site Access | |
| No idea what you mean by script information, are you using a Mac? No Mac support for DPS. DPS | |
| requires Windows based systems with Internet Explorer 7 or 8. If you are using IE 8, you will | |
| have to change the zoom level to 150% (bottom right of IE8) from 100% for compatibility reasons. | |
| Remember only IE7 and 8 supported by DPS, No Firefox, Chrome, Safari, and pop up blocker must be | |
| turned off to access DPS and this is listed under TOOLS. |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import urllib2 | |
| gh_url = 'https://api.github.com' | |
| req = urllib2.Request(gh_url) | |
| password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() |
This file contains hidden or 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
| $ find /Applications/Twitter.app \ | |
| -type f \ | |
| -exec strings {} \; \ | |
| | awk '/^values.[^ ]+$/ { sub("values.", ""); print }' | |
| FontSize | |
| ShowDevelopMenu | |
| QuoteTweetSyntax | |
| ShowFullNames | |
| TypeAnywhereToTweet | |
| TMLinkColor |