This file contains hidden or 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
| UIView *superview = self.view; | |
| NSDictionary *variables = NSDictionaryOfVariableBindings(label, superview); | |
| NSArray *constraints = | |
| [NSLayoutConstraint constraintsWithVisualFormat:@"V:[superview]-(<=1)-[label]" | |
| options: NSLayoutFormatAlignAllCenterX | |
| metrics:nil | |
| views:variables]; | |
| [self.view addConstraints:constraints]; | |
| constraints = |
This file contains hidden or 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
| var bounds = Bounds; | |
| var context = UIGraphics.GetCurrentContext (); | |
| // Gradient using CGGradient | |
| PointF start = new PointF (0.0f, 0.0f); | |
| PointF end = new PointF (0.0f, bounds.Height-(bounds.Height*0.20f)); | |
| CGGradient gradient; | |
| using (var rgb = CGColorSpace.CreateDeviceRGB ()) { | |
| float[] color1 = new float[] { 0.0f, 0.0f, 0.0f, 0.0f }; // Black Clear | |
| float[] color2 = new float[] { 0.0f, 0.0f, 0.0f, 1.0f }; // Black |
This file contains hidden or 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
| aug 27 | |
| Application must call initialize (this is breaking) | |
| disconnectOutlet method added, used rarely | |
| ember-bootstrap project has moved https://github.com/emberjs-addons/ember-bootstrap | |
| dagda1 article on routing http://www.thesoftwaresimpleton.com/blog/2012/08/20/routing_update/ | |
| sept 10 | |
| add currentPath to Ember.StateManager and therefore the router as shorthand for calling currentState.path |
This file contains hidden or 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
| APPNAME = 'wh' | |
| require 'json' | |
| require 'rake-pipeline-web-filters' | |
| WebFilters = Rake::Pipeline::Web::Filters | |
| class LoaderFilter < WebFilters::MinispadeFilter | |
| def generate_output(inputs, output) | |
| inputs.each do |input| |
This file contains hidden or 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
| require 'rake-pipeline' | |
| require 'rake-pipeline/middleware' | |
| require 'net/http' | |
| require 'net/https' | |
| require 'uri' | |
| module Rack | |
| class Proxy | |
| def initialize(app, project, opts={}) |
This file contains hidden or 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
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
| } | |
| export PS1="\[\033[00m\]\u@\h\[\033[01;34m\] \W \[\033[31m\]\$(parse_git_branch) \[\033[00m\]$\[\033[00m\] " |
This file contains hidden or 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
| require "json" | |
| require "uglifier" | |
| require "rake-pipeline-web-filters" | |
| # this gives you concat, coffee_script, and minispade methods | |
| require "rake-pipeline-web-filters/helpers" | |
| class HandlebarsFilter < Rake::Pipeline::Filter | |
| def initialize(&block) | |
| block ||= proc { |input| input.sub(/\.handlebars$/, '.js') } |
This file contains hidden or 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
| require "rake-pipeline-web-filters" | |
| output "assets" | |
| input "." do | |
| match "{assets,tmp}/**/*" do | |
| filter PipelineFinalizingFilter | |
| end | |
| match "app/**/*.js" do |
This file contains hidden or 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
| require "rake-pipeline-web-filters" | |
| input "." | |
| output "assets" | |
| match "{assets,tmp}/**/*" do | |
| filter PipelineFinalizingFilter | |
| end | |
| match "app/**/*.js" do |
This file contains hidden or 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
| App.collectionController = Em.ArrayProxy.create(Ember.PaginationSupport, { | |
| content: [], | |
| fullContent: App.store.findAll(App.Job), | |
| totalBinding: 'fullContent.length', | |
| didRequestRange: function(rangeStart, rangeStop) { | |
| var content = this.get('fullContent').slice(rangeStart, rangeStop); | |
| this.replace(0, this.get('length'), content); | |
| } | |
| }); |
NewerOlder