Skip to content

Instantly share code, notes, and snippets.

@pmaccamp
pmaccamp / segmented-radio.js
Last active August 29, 2015 14:02
Template for Bootstrap 3 segmented radio buttons in Backbone-forms
/** Segmented Radio editor */
Form.editors.SegmentedRadio = Form.editors.Select.extend({
tagName: 'div',
className: 'btn-group',
events: {
'change input[type=radio]': function() {
this.trigger('change', this);
},
'focus input[type=radio]': function() {
if (this.hasFocus) return;
@pmaccamp
pmaccamp / gist:6313966
Created August 22, 2013 23:27
Script to convert unicode files to text in perforce
#!/bin/bash
#Convert all unicode file types to text
# Find any files with unicode using grep
p4 files -a //... | grep '(.*unicode.*)' > "unicode_listing"
while read line
do
echo "Retyping ${line/\#*/}";