Skip to content

Instantly share code, notes, and snippets.

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

Nhật Phạm nhatphamcdn

🏠
Working from home
View GitHub Profile
#!/bin/bash
DOMAIN=$1
scan_sitemap () {
[ -z "$1" ] && URL="https://$DOMAIN/sitemap.xml" || URL=$1
curl -L --compressed $URL 2>/dev/null | grep -Eo "http(s?):\/\/$DOMAIN[^ \"\'()\<>]+" | while read line; do
if [[ $line = *.xml ]]
then
echo "👉 Sitemap $line"
@dalezak
dalezak / README.md
Last active September 11, 2023 09:51
Ionic Capacitor Resources Generator
  1. Run npm install cordova-res --save-dev
  2. Create 1024x1024px icon at resources/icon.png
  3. Create 2732x2732px splash at resources/splash.png
  4. Add "resources": "cordova-res ios && cordova-res android && node scripts/resources.js" to scripts in package.json
  5. Copy resources.js file to scripts/resources.js
  6. Run sudo chmod -R 777 scripts/resources.js
  7. Run npm run resources
@Akryum
Akryum / vue.config.js
Created September 27, 2018 10:18
Per-page split chunks
module.exports = {
pages: {
pageA: 'src/pageA.js',
pageB: 'src/pageB.js',
pageC: 'src/pageC.js',
},
chainWebpack: config => {
const options = module.exports
const pages = options.pages
@fedek6
fedek6 / functions.php
Created March 13, 2018 09:56
Ajax support for WP Newsletter plugin (https://www.thenewsletterplugin.com)
<?php
/** @constant string THEME_NAME **/
define( 'THEME_NAME', get_option('stylesheet') );
/**
* Custom script
*/
function my_scripts_method() {
wp_enqueue_script(
'custom-script',