This file contains 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
#!/bin/sh | |
# | |
# Get the issue based on a WEB-\d+ regex and prepend it to the commit msg | |
issue=$(git symbolic-ref HEAD | sed -n 's/^.*\(WEB-[0-9][0-9]*\).*$/\1/p') | |
if [ -n "$issue" ]; then | |
echo -n "$issue " | cat - $1 > /tmp/out && mv /tmp/out $1 | |
fi |
This file contains 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
// Using it: | |
// imageview.image = imageToGrayScale(imageview.image!) | |
func imageToGrayScale(image: UIImage) -> UIImage { | |
var imageRect = CGRectMake(0,0,CGFloat(CGImageGetWidth(image.CGImage)),CGFloat(CGImageGetHeight(image.CGImage))) | |
var colorSpace = CGColorSpaceCreateDeviceGray() | |
var context = CGBitmapContextCreate(nil, CGImageGetWidth(image.CGImage), CGImageGetHeight(image.CGImage), 8, 0, colorSpace, CGBitmapInfo.ByteOrderDefault) | |
CGContextDrawImage(context, imageRect, image.CGImage) |
This file contains 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
// | |
// BorderedView.swift | |
// Guinder | |
// | |
// Created by Andre Siviero on 02/07/15. | |
// Copyright (c) 2015 Resultate. All rights reserved. | |
// License: MIT | |
import Foundation | |
import UIKit |
This file contains 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
UIGraphicsBeginImageContext(self.view.frame.size); | |
var image = UIImage(named: "image") | |
image?.drawInRect(self.view.bounds) | |
UIGraphicsEndImageContext() | |
// This could also be another view, connected with an outlet | |
self.view.backgroundColor = UIColor(patternImage: image!) |
This file contains 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
package cz.destil.settleup.gui; | |
/* | |
* This is a small fix from MultiSpinner class as shown in: | |
* http://stackoverflow.com/questions/5015686/android-spinner-with-multiple-choice | |
* | |
* When every choice is selected in the original code, it also displays the default | |
* text. This is an updated version to make it work properly | |
*/ |
This file contains 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
/* Skew the button */ | |
.btn { | |
transform: rotate(15deg); | |
-ms-transform: rotate(15deg); /* IE 9 */ | |
-webkit-transform: rotate(15deg); /* Opera, Chrome, and Safari */ | |
} | |
/* Skew back its contents */ | |
.btn .to-skew { | |
transform: rotate(-15deg); | |
-ms-transform: rotate(-15deg); /* IE 9 */ |
This file contains 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
$.child_window.open(); |
This file contains 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
"#element_container" : { | |
width : "200dp", | |
height : "200dp", | |
}, | |
"#element_padded" : { | |
top : "20dp", | |
bottom : "20dp", | |
left : "20dp", | |
right : "20dp", | |
width : Ti.UI.FILL, |