Per @samali0996 's comment below: https://gist.github.com/pjobson/6b9fb926c59f58aa73d4efa10fe13654?permalink_comment_id=4487157#gistcomment-4487157
The new WSL Win10/11 should support this natevly. Thanks for posting the update!
Per @samali0996 's comment below: https://gist.github.com/pjobson/6b9fb926c59f58aa73d4efa10fe13654?permalink_comment_id=4487157#gistcomment-4487157
The new WSL Win10/11 should support this natevly. Thanks for posting the update!
Connect & Disconnect | |
--- | |
import json | |
def lambda_handler(event, context): | |
print(event) | |
print("****") | |
print(context) | |
SELECT u.ID, u.user_login, u.user_nicename, u.user_email | |
FROM wp_users u | |
INNER JOIN wp_usermeta m ON m.user_id = u.ID | |
WHERE m.meta_key = 'billing_rg'!=''; |
const cheerio = require('cheerio') | |
const axios = require('axios').default | |
async function fetchFollowerCounts(usernames) { | |
const followerData = usernames.map((username) => { | |
return axios.get(`https://mobile.twitter.com/${username}`).then((res) => { | |
const $ = cheerio.load(res.data) | |
const searchContext = `a[href='/${username}/followers']` | |
const followerCountString = $(searchContext) | |
.text() |
use git diff to generate file list
git diff --name-only master
add ext filter
/* Customize website's scrollbar like Mac OS | |
Not supports in Firefox and IE */ | |
/* total width */ | |
body::-webkit-scrollbar { | |
background-color: #fff; | |
width: 16px; | |
} | |
/* background of the scrollbar except button or resizer */ |
import React from 'react' | |
import { renderToString } from 'react-dom/server' | |
import parser from './shortcode-parser' | |
export const add = parser.add | |
const Aside = ({ children, config }) => { | |
/** | |
* config = { | |
* foo: true, |
{ | |
"UF": [ | |
{"nome": "Acre", "sigla": "AC"}, | |
{"nome": "Alagoas", "sigla": "AL"}, | |
{"nome": "Amapá", "sigla": "AP"}, | |
{"nome": "Amazonas", "sigla": "AM"}, | |
{"nome": "Bahia", "sigla": "BA"}, | |
{"nome": "Ceará", "sigla": "CE"}, | |
{"nome": "Distrito Federal", "sigla": "DF"}, | |
{"nome": "Espírito Santo", "sigla": "ES"}, |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
SET @oldsite='http://localhost.com'; | |
SET @newsite='http://producao.com.br'; | |
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite); | |
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite); | |
UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite); |