I hereby claim:
- I am stephenparish on github.
- I am stephenparish (https://keybase.io/stephenparish) on keybase.
- I have a public key ASAfzZIcB4alF-E7dWJsJf4BE5n6sx7R-oZg64DtHldcUgo
To claim this, I am signing this object:
| .scaleIt { | |
| -webkit-transform: scale(0.5); /* Saf3.1+, Chrome */ | |
| -moz-transform: scale(0.5); /* FF3.5+ */ | |
| -ms-transform: scale(0.5); /* IE9 */ | |
| -o-transform: scale(0.5); /* Opera 10.5+ */ | |
| transform: scale(0.5); /* IE8+ - must be on one line, unfortunately */ | |
| -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.5, M12=0, M21=0, M22=0.5, SizingMethod='auto expand')"; | |
| /* IE6 and 7 */ | |
| filter: progid:DXImageTransform.Microsoft.Matrix( |
| <div id="test-result"></div> |
| // add rounded corners to an item | |
| .border-radius (@radius: 5px) { | |
| -webkit-border-radius: @radius; | |
| -moz-border-radius: @radius; | |
| border-radius: @radius; | |
| } | |
| // add only specific rounded corners | |
| .border-radius-all (@top: 5px, @right: 5px, @bottom: 5px, @left: 5px) { | |
| -webkit-border-radius: @arguments; |
| #!/bin/sh | |
| echo "Recursively removing .svn folders from" | |
| pwd | |
| rm -rf `find . -type d -name .svn` | |
| echo "Folders removed." |
| function addNoise(canvas) { | |
| var ctx = canvas.getContext('2d'); | |
| // get canvas pixels | |
| var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); | |
| var pixels = imageData.data; | |
| for (var i = 0, il = pixels.length; i < il; i += 4) { | |
| // var color = Math.round(Math.random() * 255); | |
| var M = 100; |
| # checkout only immediate folders for a partial checkout | |
| svn co http://subversion/project/trunk my_checkout --depth immediates | |
| # change the depth and update | |
| svn update --set-depth infinity | |
| # another example | |
| svn checkout --depth empty http://svnserver/trunk/ proj | |
| svn update --set-depth infinity proj/foo |
| public class StoppableViewPager extends ViewPager { | |
| private boolean mEnabled; | |
| public StoppableViewPager(Context context) { | |
| super(context); | |
| mEnabled = true; | |
| } | |
| public StoppableViewPager(Context context, AttributeSet attrs) { |
| #import "SPAutoLayoutChildViewController.h" | |
| @implementation SPAutoLayoutChildViewController | |
| - (void)updateViewConstraints { | |
| if (self.view.superview) { | |
| UIView *thisView = self.view; | |
| thisView.translatesAutoresizingMaskIntoConstraints = NO; | |
| NSDictionary *views = NSDictionaryOfVariableBindings(thisView); | |
| [self.view.superview addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[thisView]|" options:0 metrics:nil views:views]]; |
| // ----------------------------------------------------------- | |
| // Makes the iframe fill the screen, but leaves space for the header above the iframe. | |
| // We do this becuase Safari and WebViews on iOS automatically resize the iframe height | |
| // to capture the content of the iframe. This may be fine for some sites and incorrect fo others, | |
| // this is done to make the behavior consitent across browsers and sites. | |
| function hookupIframeResize() { | |
| var iframeElement = document.querySelector('.iframe'); | |
| var headerElement = document.querySelector('.header'); | |
| function updateIframeSize() { |
I hereby claim:
To claim this, I am signing this object: