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
| # Create a role user (no perms). Fire up the console rails c | |
| $> Role.create(:title=>'User') | |
| # In your Gemfile add | |
| gem 'oa-oauth', :require => 'omniauth/oauth' | |
| # At the beginning of devise.rb. You can also create a yaml file and instantiate when Rails begin | |
| # For shake of simplicity I added the credentials at devise.rb | |
| Facebook = Rails.env.development? ? {:app_id => 2621xxx, :secret => 'e81f33d042xxxxx'} : | |
| {:app_id => 1749xxx9, :secret => '13c11be6628dc1xxxx'} |
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
| { | |
| "VM:-": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "main:1": { | |
| "linkReferences": {}, | |
| "autoDeployLib": true | |
| }, | |
| "ropsten:3": { |
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
| Verifying my Blockstack ID is secured with the address 1JcqJ3ZfYXtA3cfDdmVTATfHPKC5DoyqiJ https://explorer.blockstack.org/address/1JcqJ3ZfYXtA3cfDdmVTATfHPKC5DoyqiJ |
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
| init([]) -> | |
| % Start the scheduled GC job every minute. Naive! | |
| erlang:send_after(60 * 1000, self(), {gc}), | |
| {ok, no_state}. | |
| handle_info({gc}, State) -> | |
| case erlang:memory(binary) of | |
| % We use more than 500 MB of binary space | |
| Binary when Binary > 500000000 -> | |
| erlang:garbage_collect(self()) |
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 fetchdata() | |
| local phandle = assert(io.open('event.json', 'r')) | |
| local pdata = phandle:read('*all') | |
| phandle:close() | |
| return pdata | |
| end | |
| wrk.method = 'POST' | |
| wrk.body = fetchdata() | |
| wrk.headers['Content-Type'] = 'application/json' |
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
| init([]) -> | |
| % Start the scheduled GC job every minute. Naive! | |
| erlang:send_after(60 * 1000, self(), {gc}), | |
| {ok, no_state}. | |
| handle_info({gc}, State) -> | |
| erlang:garbage_collect(self()), | |
| erlang:send_after(60 * 1000, self(), {gc}), | |
| {noreply, State}. |
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
| private async void GoTaskUnawaitedMethod(object sender, RoutedEventArgs e) | |
| { | |
| CrashUnawaitedTaskMethod(); | |
| } | |
| private async Task CrashUnawaitedTaskMethod() | |
| { | |
| throw new Exception("Task Unawaited"); | |
| } |
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
| private async void CrashUnawaitedVoidMethod(object sender, RoutedEventArgs e) | |
| { | |
| throw new Exception("Void Unawaited"); | |
| } |
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
| -optimizationpasses 25 | |
| -dontusemixedcaseclassnames | |
| -dontskipnonpubliclibraryclasses | |
| -dontpreverify | |
| -verbose | |
| -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* | |
| -printmapping out.map | |
| -renamesourcefileattribute SourceFile | |
| -keepattributes SourceFile,LineNumberTable | |
| -keep class com.bugsense.** { *; } |
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
| // in didFinishLaunchingWithOptions at AppDelegate.m | |
| [BugSenseController setErrorNetworkOperationsCompletionBlock:^() { | |
| NSLog(@"Application crashed with errorId: %ld with an error count since last reset: %d", [BugSenseController lastCrashId], [BugSenseController crashCount]); | |
| if ([BugSenseController crashCount] == 1) { // after every crash, customize! | |
| UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"We're sorry!" | |
| message:@"We are aware of the crashes that you have experienced lately. Would you like to tell us more about it?" | |
| delegate:self | |
| cancelButtonTitle:@"No" |
NewerOlder