Skip to content

Instantly share code, notes, and snippets.

View actuosus's full-sized avatar
🏠
Working from home

Arthur Chafonov actuosus

🏠
Working from home
View GitHub Profile
Index: public/js/views/search_facet.js
===================================================================
--- public/js/views/search_facet.js (revision )
+++ public/lib/js/views/search_facet.js (revision )
@@ -167,7 +167,7 @@
resp(matches);
} else {
var re = VS.utils.inflector.escapeRegExp(searchTerm || '');
- var matcher = new RegExp('\\b' + re, 'i');
+ var matcher = new RegExp('[^a-zA-Zа-яА-ЯёЁ]' + re, 'i');
Index: public/js/views/search_input.js
===================================================================
--- public/js/views/search_input.js (revision )
+++ public/lib/js/views/search_input.js (revision )
@@ -101,7 +101,7 @@
// `facetMatches` callback to skip any further ordering done client-side.
autocompleteValues : function(req, resp) {
var searchTerm = req.term;
- var lastWord = searchTerm.match(/\w+\*?$/); // Autocomplete only last word.
+ var lastWord = searchTerm.match(/[a-zA-Zа-яА-ЯёЁ]+\*?$/); // Autocomplete only last word.
@actuosus
actuosus / Appfile
Last active February 19, 2016 00:59
otto dev destroy crash
application {
name = "csport"
type = "docker-external"
dependency { source = "github.com/hashicorp/otto/examples/mysql" }
dependency { source = "github.com/hashicorp/otto/examples/redis" }
}
project {
name = "csport"
infrastructure = "test"
@actuosus
actuosus / Appfile
Created February 19, 2016 01:10
otto compile crash
application {
name = "csport"
type = "custom"
dependency { source = "github.com/hashicorp/otto/examples/mysql" }
dependency { source = "github.com/hashicorp/otto/examples/redis" }
}
project {
name = "csport"
infrastructure = "vp"
@actuosus
actuosus / md5.sh
Created April 25, 2017 13:56
Detect macOS and fallback md5sum
# Detect OS
OS="`uname`"
case $OS in
'Linux')
OS='Linux'
alias ls='ls --color=auto'
;;
'FreeBSD')
OS='FreeBSD'
alias ls='ls -G'
@actuosus
actuosus / react-native-image-crop-picker+0.28.0.patch
Created April 13, 2020 13:53
Patch file to compile react-native-image-crop-picker with Xcode 10
diff --git a/node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePicker/QBAssetsViewController.m b/node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePicker/QBAssetsViewController.m
index 0a9fddb..865854b 100644
--- a/node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePicker/QBAssetsViewController.m
+++ b/node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePicker/QBAssetsViewController.m
@@ -194,9 +194,11 @@ - (void)setUpToolbarItems
// Info label
UIColor *labelColor = [UIColor blackColor];
+ #ifdef __IPHONE_13_0
if (@available(iOS 13.0, *)) {
@actuosus
actuosus / @react-native-firebase+messaging+6.4.0.patch
Created April 23, 2020 20:00
React Native Firebase Messaging Patch to use with patch-package when `mutable-content` is number or string
diff --git a/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m b/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m
index 18d69d9..8685051 100644
--- a/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m
+++ b/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m
@@ -113,7 +113,7 @@ + (NSDictionary *)remoteMessageUserInfoToDict:(NSDictionary *)userInfo {
}
// message.mutableContent
- if (apsDict[@"mutable-content"] != nil && [apsDict[@"mutable-content"] isEqualToString:@"1"]) {
+ if (apsDict[@"mutable-content"] != nil && [apsDict[@"mutable-content"] intValue] == 1) {