This file contains hidden or 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, { Component } from 'react'; | |
import { | |
StyleSheet, | |
View, | |
Modal, | |
ActivityIndicator | |
} from 'react-native'; | |
const Loader = props => { | |
const { |
This file contains hidden or 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 | |
//IT SHOULD BE INSIDE YOUR MEHTOD | |
//get last record | |
$record = RecordModel::latest()->first(); | |
$expNum = explode('-', $record->invoiceno); | |
This file contains hidden or 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 axios = require('axios') | |
/* ... */ | |
const params = new URLSearchParams() | |
params.append('name', 'Akexorcist') | |
params.append('age', '28') | |
params.append('position', 'Android Developer') | |
params.append('description', 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/') | |
params.append('awesome', true) |
This file contains hidden or 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
// First, put UA-Parser-JS CDN | |
<script src="https://cdn.jsdelivr.net/npm/ua-parser-js@0/dist/ua-parser.min.js"></script> | |
<script> | |
// Second, instantiate UAParser | |
const parser = new UAParser(); | |
const parserResult = parser.getResult(); | |
const browserName = parserResult.browser.name; | |
const browserVersion = parseInt(parserResult.browser.version.split('.')[0], 10); | |
let STANDARD_VERSION; | |
console.log(parserResult); |
This file contains hidden or 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 axios = require('axios').default; | |
const _ = require('lodash'); | |
const email = '<email>'; | |
const key = '<global_key>'; | |
const zone = '<zone>' | |
const url = `https://api.cloudflare.com/client/v4/zones/${zone}/dns_records` | |
function deleteRec(dns) { |
This file contains hidden or 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: '2' | |
services: | |
mariadb: | |
image: mariadb | |
volumes: | |
- /srv/Configs/Databases/Moodle:/var/lib/mysql | |
environment: | |
- MYSQL_ROOT_PASSWORD=moodle | |
- MYSQL_ROOT_USER=root | |
- MYSQL_DATABASE=moodle |
This file contains hidden or 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 from "react"; | |
import { useStore } from "./store"; | |
export default function CounterReact({ demo }) { | |
const state = useStore((state) => state); | |
let add = () => { | |
state.inc(); | |
}; |
This file contains hidden or 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
/* | |
* Usage: | |
* const { alert, confirm, prompt } = useModals() | |
* alert("Hey!") // awaitable too | |
* if (await confirm("Are you sure?")) ... | |
* const result = await prompt("Enter a URL", "http://") | |
*/ | |
import React, { | |
createContext, |
This file contains hidden or 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
// note for typescript users: you will need to install node.js types into your project with `npm i -D @types/node` | |
import { fileURLToPath } from 'url'; | |
import path, { dirname } from 'path'; | |
const __filename = fileURLToPath(import.meta.url); | |
const __dirname = dirname(__filename); | |
export default { | |
// all the usual config goes here... |