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
| # Git shortcuts | |
| alias g='git' | |
| function ga() { git add "${@:-.}"; } # Add all files by default | |
| alias gp='git push' | |
| alias gpa='gp --all' | |
| alias gu='git pull' | |
| alias gl='git log' | |
| alias gg='gl --decorate --oneline --graph --date-order --all' | |
| alias gs='git status' |
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
| import java.util.concurrent.Callable | |
| import com.android.build.gradle.BasePlugin | |
| import java.util.regex.Pattern | |
| apply plugin: 'android' | |
| apply plugin: RobolectricPlugin | |
| class RobolectricPlugin implements Plugin<Project> { | |
| public static final String ANDROID_PLUGIN_NAME = "android"; |
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
| package com.facebook.rebound.origami; | |
| import android.app.Activity; | |
| import android.content.res.Resources; | |
| import android.os.Bundle; | |
| import android.view.View; | |
| import android.view.ViewTreeObserver; | |
| import com.facebook.rebound.SimpleSpringListener; | |
| import com.facebook.rebound.Spring; |
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
| public class BrandListFragment extends BaseFragment { | |
| private static final String ARGS_LOCATION_SPEC = "location_spec"; | |
| private LocationSpec location; | |
| @InjectView(R.id.progress) View progress; | |
| @InjectView(R.id.brand_list) StickyListHeadersListView brandList; |
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
| /* | |
| Simple Titanium Studio plugin that creates a notification with sound in Notifications Center | |
| when build is finished | |
| In the project directory create a folder plugins/io.wlm.notifier/1.0/hooks and copy this file inside. | |
| The name of the js file is not important, you can also change the plugin name to whatever you want. | |
| Install npm module node-notifier https://github.com/mikaelbr/node-notifier | |
| or download it and copy it inside a node_modules folder at the same level as this file. | |
| In Tiapp.xml add a reference to the plugin like | |
| <plugins> |
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
| class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController | |
| def facebook | |
| # You need to implement the method below in your model | |
| @user = User.find_for_facebook_oauth(env["omniauth.auth"], current_user) | |
| if @user.persisted? | |
| flash[:notice] = I18n.t "devise.omniauth_callbacks.success", :kind => "Facebook" | |
| sign_in_and_redirect @user, :event => :authentication | |
| else | |
| session["devise.facebook_data"] = env["omniauth.auth"] |
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
| /** | |
| * Simple doc-property generator. Uses JavaDoc style comments. | |
| * Also provides type checking guards. | |
| * | |
| * Dependencies: SpiderMonkey >= 1.7 | |
| * | |
| * by Dmitry Soshnikov <dmitry.soshnikov@gmail.com> | |
| * MIT Style License | |
| */ |
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
| ## Rails App Template | |
| ## Useful for Rails 3.0.x and Ruby 1.9.2 | |
| ## Run using $ rails new [appname] -JT -m tpl-basicapp.rb | |
| # ======== | |
| # = Gems = | |
| # ======== | |
| # pre-install spork, dydram and elastic_searchable | |
| run "gem install spork -v 0.9.0.rc --pre" |
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
| function setSeat(e, handler) { | |
| e.preventDefault(); | |
| var seat = $(e.target) | |
| $('.selected').removeClass('selected').click(handler); | |
| seat.unbind('click', handler); | |
| $('#seatSelected').text(seat.data('seat')); |
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
| system ~/projects/jruby $ jruby -v bench/bench_red_black.rb | |
| jruby 1.7.0.dev (ruby-1.8.7-p352) (2011-12-18 43cbc21) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java] | |
| 2.748 | |
| 1.902 | |
| 1.87 | |
| 1.877 | |
| 1.873 | |
| 1.868 | |
| 1.864 | |
| 1.876 |
OlderNewer