Skip to content

Instantly share code, notes, and snippets.

@cybertk
cybertk / generate_patch.rb
Created July 22, 2014 16:34
Generate patches from gerrit
#!/usr/bin/env ruby
# Generate patch from gerrit
require 'optparse'
def generatePatch(base_branch, topic_pattern, output_dir)
`git review -l | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g"`.lines do |line|
_, patch, topic = line.match(/(\d+).*(#{topic_pattern}).*/).to_a
next if not patch or not topic
@cybertk
cybertk / resign-ipa.py
Created April 8, 2014 17:37
Resign ipa
#!/usr/bin/env python
# Copyright (c) 2013 Quanlong He. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
resign-ipa.py -- Resign the ipa with new certificate and mobileprovision.
"""
"""