Skip to content

Instantly share code, notes, and snippets.

Jean-Richard Lai jrichardlai

Block or report user

Report or block jrichardlai

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jrichardlai
jrichardlai / ErrorManager.java
Last active Feb 7, 2018
Bugsnag integration with React Native
View ErrorManager.java
import android.util.Base64;
import android.util.Log;
import com.bugsnag.android.Bugsnag;
import com.bugsnag.android.MetaData;
import com.bugsnag.android.Severity;
import com.facebook.react.bridge.*;
import java.io.File;
import java.io.InputStream;
View dedup-fbjs.sh
#!/bin/bash -x
find . -name 'fbjs' -print | grep "\./node_modules/fbjs" -v | xargs rm -rf
@jrichardlai
jrichardlai / not_route_to.rb
Created May 13, 2012
Spec Matcher for Rails and Rspec1 to ensure that a route does not route to a specific path
View not_route_to.rb
# Sometimes in your app you may have a global route that will catch everything
# So it's not possible to use should_not be_routable or should_not route_to
# In this case you can use should not_route_to.
# Example:
# {:get => '/users/123/upgrade'}.should not_route_to(:controller => "users", :action => "upgrade", :user_id => "123")
Spec::Matchers.define :not_route_to do |destination|
extend Spec::Rails::Example::RoutingHelpers
match_unless_raises do |path|
method, path, querystring = Spec::Rails::Matchers::PathDecomposer.decompose_path(path)
@jrichardlai
jrichardlai / gist:1083597
Created Jul 14, 2011
Added onControlsClick to jquery.bxslider.js
View gist:1083597
// In showControls()
// click next control
$nextHtml.click(function() {
base.goToNextSlide();
options.onControlsClick(base);
return false;
});
// click prev control
$prevHtml.click(function() {
You can’t perform that action at this time.