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 | |
brew search librabbitmq | |
brew install rabbitmq-c | |
pecl install amqp | |
# set the path to librabbitmq install prefix [autodetect] : /usr/local/Cellar/rabbitmq-c/0.10.0 | |
# if it fails follow the following (reference: https://github.com/pdezwart/php-amqp/issues/355#issuecomment-563203121): |
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
<?php | |
function generateRandomString($length = 10) { | |
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
$charactersLength = strlen($characters); | |
$randomString = ''; | |
for ($i = 0; $i < $length; $i++) { | |
$randomString .= $characters[rand(0, $charactersLength - 1)]; | |
} | |
return $randomString; |
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 React, { useCallback, useRef, useEffect } from 'react'; | |
import { | |
Image, | |
View, | |
ScrollView, | |
KeyboardAvoidingView, | |
Platform, | |
TextInput, | |
Alert, | |
Linking, |
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 React, { useCallback, useRef, useEffect } from 'react'; | |
import { | |
Image, | |
View, | |
ScrollView, | |
KeyboardAvoidingView, | |
Platform, | |
TextInput, | |
Alert, | |
Text, |
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 { AxiosResponse } from "axios"; | |
// the kind of data I expect from the AJAX request... | |
interface AuthData { | |
access_token?: string; | |
refresh_token?: string; | |
} | |
// ... a type dedicated to the Axios response... | |
type AuthResponse = AxiosResponse<AuthData>; |
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 | |
hda-verb 0x19 SET_PIN_WIDGET_CONTROL 0x25 | |
hda-verb 0x21 SET_UNSOLICITED_ENABLE 0x83 | |
echo -e "Done" | |
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
version: "3" | |
services: | |
mysql: | |
container_name: mysql | |
image: mysql:5.7 | |
ports: | |
- 3306:3306 | |
environment: | |
MYSQL_ROOT_PASSWORD: <!!sua-senha!!> | |
volumes: |
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
{ | |
sensor string, | |
on_value number, | |
on_condition string enum(">=", "<=") | |
off_value number, | |
off_condition string enum(">=", "<=") | |
} |
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
const {getDefaultConfig} = require('metro-config'); | |
module.exports = (async () => { | |
const { | |
resolver: {sourceExts, assetExts}, | |
} = await getDefaultConfig(); | |
return { | |
transformer: { | |
babelTransformerPath: require.resolve('react-native-svg-transformer'), | |
}, |
NewerOlder