If you need to change tawk's locale dynamically (i.e. in SPA), here is the code I use. There is a small issue, though - everytime tawk adds new div to body and there is no way to correctly detect it and remove (ids are dynamic and there is no classname). However, as far as it is hidden, this should not be a problem.
This file contains 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
import 'dart:async'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:hooks_riverpod/hooks_riverpod.dart'; | |
import 'package:location/location.dart'; | |
class PersonLocationProvider extends ChangeNotifier { | |
Location _location = new Location(); | |
PermissionStatus _permissionGranted; | |
StreamController<LocationData> currentLocation = StreamController.broadcast(); |
This file contains 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
let currentColor = '#ebedf0'; | |
let clicking = false; | |
const boxes = document.querySelectorAll('.js-calendar-graph-svg rect'); | |
const graph = document.querySelector('.js-calendar-graph-svg'); | |
// code for switching the current color | |
function handleColorChange(e) { | |
const el = e.currentTarget; | |
currentColor = el.style['background-color']; | |
console.log(currentColor) |
This file contains 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
import 'dart:convert'; | |
Map<String, dynamic> parseJwt(String token) { | |
final parts = token.split('.'); | |
if (parts.length != 3) { | |
throw Exception('invalid token'); | |
} | |
final payload = _decodeBase64(parts[1]); | |
final payloadMap = json.decode(payload); |
This file contains 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
#!/bin/bash | |
#Please note - This script tested on Centos-6,7/Redhat-6,7. | |
#Check Internet Connection | |
IS=`/bin/ping -c 5 4.2.2.2 | grep -c "64 bytes"` | |
if (test "$IS" -gt "2") then | |
internet_conn="1" | |
#Check Gdrive Software Install Or Not | |
file="/usr/bin/gdrive" | |
if [ -f "$file" ] | |
then |
This file contains 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
/// flutter_background_geolocation Hello World | |
/// https://github.com/transistorsoft/flutter_background_geolocation | |
//// | |
// For pretty-printing location JSON. Not a requirement of flutter_background_geolocation | |
// | |
import 'dart:convert'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_background_geolocation/flutter_background_geolocation.dart' |
- Edit the file at
/Library/Backblaze.bzpkg/bzdata/bzexcluderules_editable.xml
. - Add these rules inside the
bzexclusions
tag:
<!-- Exclude node_modules. -->
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/node_modules/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/.git/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
This file contains 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
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/ | |
# GitLab uses docker in the background, so we need to specify the | |
# image versions. This is useful because we're freely to use | |
# multiple node versions to work with it. They come from the docker | |
# repo. | |
# Uses NodeJS V 9.4.0 | |
image: node:9.4.0 | |
# And to cache them as well. |
This file contains 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
{ | |
"editor.multiCursorModifier": "ctrlCmd", | |
"editor.snippetSuggestions": "top", | |
"editor.formatOnPaste": true, | |
"editor.fontFamily" : "Fira Code", | |
"editor.fontLigatures": true, | |
"emmet.triggerExpansionOnTab": true, | |
"php.suggest.basic": false, | |
"editor.autoIndent": true, | |
"emmet.includeLanguages" : { |
NewerOlder