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 fetchUsers = require("./index"); | |
const getError = require("./error"); | |
const getFood = require('./food'); | |
const axios = require("axios"); | |
jest.mock('axios'); | |
test('should ger users data', async () => { | |
const users = [{ name: 'Bob' }]; | |
const resp = { data: users }; |
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
/** | |
* Plugin Name: Test plugin | |
* Plugin URI: https://tawhid.me | |
* Description: lorem ipusm. | |
* Version: 1.0.0 | |
* Author: Tawhidul Islam Khan | |
* Author URI: https://tawhid.me | |
* WC requires at least: 5.0.0 | |
* WC tested up to: 6.5.1 |
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
After run this in cmd | |
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ | |
cd android && ./gradlew assembleDebug | |
then you can get apk app/build/outputs/apk/debug/app-debug.apk |
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
I've renamed the project' subfolder from: "android/app/src/main/java/MY/APP/OLD_ID/" to: "android/app/src/main/java/MY/APP/NEW_ID/" | |
Then manually switched the old and new package ids: | |
In: android/app/src/main/java/MY/APP/NEW_ID/MainActivity.java: | |
package MY.APP.NEW_ID; | |
In android/app/src/main/java/MY/APP/NEW_ID/MainApplication.java: |
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
#!/usr/bin/env bash | |
# Shell Boilerplate | |
path="$1.test" | |
dbname="db_$1" | |
dbuser="root" | |
dbpass="secret" | |
url="localhost/$1.test"; | |
title="Title" | |
admin_user="admin" | |
admin_password="secret" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
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
########## Install NGINX ############## | |
# Install software-properties-common package to give us add-apt-repository package | |
sudo apt-get install -y software-properties-common | |
# Install latest nginx version from community maintained ppa | |
sudo add-apt-repository ppa:nginx/stable | |
# Update packages after adding ppa |
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 makeTableResponsive = (mq, t) => { | |
var q = window.matchMedia(mq); | |
if (q.matches) { | |
let headings = []; | |
let tables = document.querySelectorAll(t); | |
if (tables && tables.length > 0) { | |
tables.forEach(table => { | |
let thead = table.querySelector("thead"); | |
let headingTags = thead.querySelectorAll("th"); | |
let tbody = table.querySelector("tbody"); |
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
https://www.youtube.com/watch?v=IL7Jd9rjgrM |
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 artisan cache:clear | |
php artisan route:cache | |
php artisan view:clear | |
php artisan config:cache | |
echo "All cached cleared" |
NewerOlder