Skip to content

Instantly share code, notes, and snippets.

@morellan
morellan / AdbCommands
Created June 2, 2021 01:21 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@morellan
morellan / casting_types.rb
Created May 15, 2020 02:33 — forked from otobrglez/casting_types.rb
unknown OID 705: failed to recognize type of '<field>'. It will be treated as String.
#!/usr/bin/env ruby
# If you get "unknown OID 705: failed to recognize type of '<field>'. It will be treated as String."
# it probably means that type of column could not be identified when retriving records
# Example
User.where("'something' as something")
# Will results in unknown OID. However doing this:
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
USD 60
Qty Desc Price
2010 Core Set
4 Lightning Bolt (NM) 1.99
2011 Core Set
4 Mana Leak (NM) 0.49
2014 Core Set
3 Young Pyromancer (NM) 2.49
Dark Ascension
USD 25
Qty Desc Price
10th Edition
4 Giant Growth (NM) 0.39
2014 Core Set
2 Ranger's Guile (NM) 0.25
Avacyn Restored
2 Wild Defiance (EX) 3.49
Duel Decks: Zendikar Vs. Eldrazi
USD 65
Qty Desc Price
2011 Core Set
4 Ornithopter (NM) 0.49
2015 Core Set
4 Darksteel Citadel (NM) 0.69
4 Ensoul Artifact (NM) 1.19
2 Military Intelligence (NM) 0.29
Born of the Gods
USD 60
Qty Desc Price
2010 Core Set
4 Mesa Enchantress (NM) 0.79
2011 Core Set
4 Condemn (NM) 0.29
2012 Core Set
4 Gladecover Scout (NM) 0.25
3 Oblivion Ring (NM) 0.49
function get_avatar_from_service(service, userid, size) {
// this return the url that redirects to the according user image/avatar/profile picture
// implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback
// for google use get_avatar_from_service('google', profile-name or user-id , size-in-px )
// for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word )
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px )
// for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word )
// for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px )
// everything else will go to the fallback
// google and gravatar scale the avatar to any site, others will guided to the next best version