Skip to content

Instantly share code, notes, and snippets.

@bogdanRada
bogdanRada / genymotionwithplay.txt
Created February 2, 2017 13:07 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
@bogdanRada
bogdanRada / gist:37ff91dfcc352d1b64dd76604ef0ecd4
Created December 23, 2016 08:53 — forked from bbirec/gist:5748489
ISO8601 Adapter for Gson.
package com.bbirec.dabang.common;
import com.google.gson.*;
import java.lang.reflect.Type;
import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
#gem 'pg'
# Use Puma as the app server
gem 'puma', '~> 3.0'
@bogdanRada
bogdanRada / SignatureCheck.java
Created October 25, 2016 10:05 — forked from scottyab/SignatureCheck.java
Simple Android signature check. It's not bullet proof but does increase the difficulty of backdooring the app
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.Signature;
public class TamperCheck {
//we store the hash of the signture for a little more protection
private static final String APP_SIGNATURE = "1038C0E34658923C4192E61B16846";
@bogdanRada
bogdanRada / AndroidManifest.xml
Created October 18, 2016 14:55 — forked from TomTasche/AndroidManifest.xml
OAuth flow using the AccountManager on Android
<!-- ... -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<!-- ... -->
@bogdanRada
bogdanRada / AccountAuthenticator.java
Created October 18, 2016 12:46 — forked from burgalon/AccountAuthenticator.java
Implementing OAuth2 with AccountManager, Retrofit and Dagger
public class AccountAuthenticator extends AbstractAccountAuthenticator {
private final Context context;
@Inject @ClientId String clientId;
@Inject @ClientSecret String clientSecret;
@Inject ApiService apiService;
public AccountAuthenticator(Context context) {
super(context);
  • Dynamic Dispatch
  • Dynamic Method
  • Ghost Methods
  • Dynamic Proxies
  • Blank Slate
  • Kernel Method
  • Flattening the Scope (aka Nested Lexical Scopes)
  • Context Probe
  • Class Eval (not really a 'spell' more just a demonstration of its usage)
  • Class Macros
@bogdanRada
bogdanRada / .cane
Created July 25, 2016 11:41 — forked from ToadJamb/.cane
common rails rake tasks
--no-doc
--style-measure 80
--abc-max 9
--abc-glob {rakefile,Gemfile,**/*.{rb,rake,example}}
--style-glob {rakefile,Gemfile,**/*.{rb,rake,example}}
--style-exclude db/schema.rb
--style-exclude config/initializers/secret_token.rb
--abc-exclude Class#method
@bogdanRada
bogdanRada / http_request_pulsar.rb
Created July 13, 2016 05:00 — forked from pmashchak/http_request_pulsar.rb
HTTP request wrapper with retry logic and Manticore client integration + DynamoDB data class
# HTTPRequest class is an http client for API calls services
# see usages bellow
class HTTPRequest
attr_accessor :client, :options, :exceptions, :api_context, :async
module ::Manticore
class ResponseCodeException < ManticoreException; end
end
@bogdanRada
bogdanRada / main.rb
Created July 12, 2016 08:12 — forked from robhurring/main.rb
Lightweight actors in ruby
require 'thread'
module Actor
class << self
def included(base)
base.extend(ClassMethods)
end
def current
Thread.current[:actor]