Skip to content

Instantly share code, notes, and snippets.

View xelven's full-sized avatar

Allen Chan xelven

View GitHub Profile
class ExpoUserToUser
def self.start_sync
ExpoUser.find_each do |expo_user|
if expo_user.has_role? :expo_owner
ems_user = User.find_by(email: expo_user.email)
if ems_user.blank?
# ems_user = User.new(email: expo_user.email, name: expo_user.name, password: expo_user.password, company: expo_user.company, phone: "", country_code:"")
ems_user = User.find_or_initialize_by(email: expo_user.email)
# name: expo_user.name, password: expo_user.password, company: expo_user.company, phone: "", country_code:""
ems_user.name = expo_user.name
ExpoUser.find_each do |expo_user|
if expo_user.has_role? :expo_owner
ems_user = User.find_by(email: expo_user.email)
puts "dashboard user : "
puts expo_user.email
if ems_user.blank?
puts "didnt had EMS user : "
puts expo_user.email
end
end
@xelven
xelven / gist:02f149dfafc906934f0681d53c6d1afd
Created June 9, 2017 06:29
crash in doBCRwithPicIndex
[fg169,169,169;g;2017-06-09 14:26:18.615 [main] > ^^^[;
retryQueue.operations count = 0
HCDAT : null
Data path : /var/containers/Bundle/Application/2C694975-0399-4127-84FE-175C2098003C/ContactStaging.app/
Load Dic 2672 from /var/containers/Bundle/Application/2C694975-0399-4127-84FE-175C2098003C/ContactStaging.app/name_ENb2u.txt
Load Dic 361 from /var/containers/Bundle/Application/2C694975-0399-4127-84FE-175C2098003C/ContactStaging.app/name_PYb2u.txt
Load Dic 630 from /var/containers/Bundle/Application/2C694975-0399-4127-84FE-175C2098003C/ContactStaging.app/name_CHb2u.txt
Load Map 308 from /var/containers/Bundle/Application/2C694975-0399-4127-84FE-175C2098003C/ContactStaging.app/area_chb2u.txt
Load Map 182 from /var/containers/Bundle/Application/2C694975-0399-4127-84FE-175C2098003C/ContactStaging.app/AreaCode_b2u.txt
@xelven
xelven / gist:5ae603018f934f885598d8aaae3352ce
Created May 22, 2017 15:46
Yunmai iOS SDK cannot initWithLanguage
[fg169,169,169;g;2017-04-27 13:32:20.260 [main] > ^^^[;
0000
2017-04-27 13:32:46.041 ContactStaging[412:102432] HC_StartBCR failed.==200
0000
2017-04-27 13:32:57.108 ContactStaging[412:102432] HC_StartBCR failed.==200
g169,169,169;g;2017-04-27 13:32:20.260 [main] > ^^^[;
0000
2017-04-27 13:32:46.041 ContactStaging[412:102432] HC_StartBCR failed.==200
@xelven
xelven / gist:c0fae7d62751c9778e21458b07a71c39
Last active May 22, 2017 15:34
Yunmai Android SDK crash - SIGSEGV
05-18 15:10:38.013 3719-6711/com.eventxtra.expo.contact.debug A/libc: Fatal signal 11 (SIGSEGV) at 0x000000a0 (code=1), thread 6711 (uil-pool-2-thre)
--------------------------------------------
05-18 15:06:29.863 3719-3719/com.eventxtra.expo.contact.debug I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
05-18 15:06:29.863 3719-3719/com.eventxtra.expo.contact.debug W/dalvikvm: VFY: unable to resolve interface method 24635: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
05-18 15:06:29.863 3719-3719/com.eventxtra.expo.contact.debug D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
05-18 15:06:29.863 3719-3719/com.eventxtra.expo.contact.debug W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
05-18 15:42:52.383 30406-30840/com.eventxtra.expo.contact.debug D/tag: --startBCR--end-->1
05-18 15:42:52.833 30406-31732/com.eventxtra.expo.contact.debug D/ocr_manager: ---------模糊判断开始--2---------
05-18 15:42:52.903 30406-31732/com.eventxtra.expo.contact.debug D/ocr_manager: ---------模糊判断通过---2--------
05-18 15:42:53.423 30406-31732/com.eventxtra.expo.contact.debug A/libc: Fatal signal 8 (SIGFPE) at 0x000076c6 (code=-6), thread 31732 (Thread-612)
@xelven
xelven / gist:937b5e7d7fd406d7a00b3e22a22dff72
Created May 22, 2017 15:25
Yunmai iOS SDK OCR_LAN_CENTEURO and OCR_LAN_TURKISH got Error:
@interface YMIDCardEngine : NSObject
- (id)initWithLanguage:(NSInteger)language andChannelNumber:(NSString*)channelNumberStr;
@end
//for OCR language definition
typedef NS_ENUM (NSInteger, OCR_Language){
OCR_LAN_NIL = 0x00, // NIL
OCR_LAN_ENGLISH = 0x01, // English
...
@xelven
xelven / gist:17ea18f02480fc986ae0c78d24835607
Last active May 16, 2017 09:01
iOS Yunmai Lib crash on 2017 May 16
# Crashlytics - plaintext stacktrace downloaded by EventXtra Dev at Tue, 16 May 2017 09:00:17 GMT
# URL: https://fabric.io/eventxtra/ios/apps/com.eventxtra.expo.contactstaging/issues/591ab0e8be077a4dccc8cda0?time=last-twenty-four-hours/sessions/74e2c87f7ecc401e81b09d7942f6c778_88f930fd492844d88471a039e196bf3a_0_v1
# Organization: EventXtra
# Platform: ios
# Application: Pocknet - Lead Retrieval
# Version: N/A
# Bundle Identifier: com.eventxtra.expo.ContactStaging
# Issue #: 62
# Issue ID: 591ab0e8be077a4dccc8cda0
# Session ID: 74e2c87f7ecc401e81b09d7942f6c778_88f930fd492844d88471a039e196bf3a_0_v1
# Crashlytics - plaintext stacktrace downloaded by EventXtra Dev at Tue, 16 May 2017 09:00:17 GMT
# URL: https://fabric.io/eventxtra/ios/apps/com.eventxtra.expo.contactstaging/issues/591ab0e8be077a4dccc8cda0?time=last-twenty-four-hours/sessions/74e2c87f7ecc401e81b09d7942f6c778_88f930fd492844d88471a039e196bf3a_0_v1
# Organization: EventXtra
# Platform: ios
# Application: Pocknet - Lead Retrieval
# Version: N/A
# Bundle Identifier: com.eventxtra.expo.ContactStaging
# Issue #: 62
# Issue ID: 591ab0e8be077a4dccc8cda0
# Session ID: 74e2c87f7ecc401e81b09d7942f6c778_88f930fd492844d88471a039e196bf3a_0_v1