#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
| #!/usr/bin/env python | |
| import os | |
| import urllib2 | |
| import json | |
| import subprocess | |
| user=None | |
| repo=None |
#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
| javascript:(function({ | |
| var INSTAPAPER=true,w=window,d=document,pageSelectedTxt=w.getSelection?w.getSelection():(d.getSelection)?d.getSelection():(d.selection?d.selection.createRange().text:0),pageTitle=d.title,pageUri=w.location.href,tmplt=""; | |
| tmplt="From ["+pageTitle+"]("+pageUri+"):\n\n"; | |
| if(pageSelectedTxt!="") { | |
| pageSelectedTxt=">%20"+pageSelectedTxt; | |
| pageSelectedTxt=pageSelectedTxt.replace(/(\r\n|\n+|\r)/gm,"\n"); | |
| pageSelectedTxt=pageSelectedTxt.replace(/\n/g,"\n>%20\n>%20"); | |
| w.location.href="nvalt://make/?txt="+encodeURIComponent(tmplt+pageSelectedTxt)+"&title="+encodeURIComponent(pageTitle) | |
| } | |
| else { |
| Rails CMS alternatives | |
| ====================== | |
| Note: project activity was checked on 11/26/09 for most of these projects, and the "last update" field has not been kept up to date since then. | |
| Active projects: | |
| --------------- | |
| adva-cms | |
| repo: http://github.com/svenfuchs/adva_cms/ | |
| site: http://adva-cms.org/ | |
| Last update: 11/24/09 |
| config.gem "toml", :version => "0.0.4" | |
| class BlankSlate | |
| class << self | |
| # Hide the method named +name+ in the BlankSlate class. Don't | |
| # hide +instance_eval+ or any method beginning with "__". | |
| def hide(name) | |
| # CHANGED: if instance_methods.include?(name.to_s) and | |
| if instance_methods.include?(name.to_sym) and | |
| name !~ /^(__|instance_eval)/ | |
| @hidden_methods ||= {} |
| # html2markdown.rb | |
| require 'nokogiri' | |
| module Html2Markdown | |
| class HtmlDocument < Nokogiri::XML::SAX::Document | |
| MAP = { "b" => "strong", "i" => "em" } | |
| def initialize() | |
| @list = nil |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| # Since Git is well structured, Grit uses a method missing (Grit::Git#method_missing) to 'systematically' execute Git commands: | |
| require 'grit' | |
| include Grit | |
| gritty = Grit::Git.new('/tmp/filling-in') | |
| gritty.clone({:quiet => false, :verbose => true, :progress => true, :branch => '37s'}, "git://github.com/cookbooks/cc-aws.git", "/tmp/cc-aws2") | |
| # => "Initialized empty Git repository in /tmp/cc-aws2/.git/\n" | |
| Dir.entries('/tmp/cc-aws2').size | |
| # => 10 |
| #!/usr/bin/python | |
| # Make sure file permission is set so that Owner, Group, and Everyone can EXECUTE. | |
| # Otherwise server error | |
| import os | |
| import platform | |
| print "Content-Type: text/html" | |