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
# Set local git config | |
git config user.name "Your Name Here" | |
git config user.email your@email.example | |
# Set global git config | |
git config --global user.name "Your Name Here" | |
git config --global user.email your@email.example | |
# Check your git settings | |
git config user.name && git config user.email |
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
function sleep(ms) { | |
return new Promise((resolve) => setTimeout(resolve, ms)); | |
} | |
async function unlikeTweets() { | |
let tweets = document.querySelectorAll('[data-testid="tweet"]'); | |
for (let tweet of tweets) { | |
let unlikeButton = tweet.querySelectorAll('[data-testid="unlike"]')[0]; | |
if (unlikeButton != null) { | |
unlikeButton.scrollIntoView(); | |
unlikeButton.click(); |
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
function sleep(ms) { | |
return new Promise((resolve) => setTimeout(resolve, ms)); | |
} | |
async function deleteTweets() { | |
let tweets = document.querySelectorAll('[data-testid="tweet"]'); | |
for (let tweet of tweets) { | |
// Replace "Your Display Name" | |
if (tweet.querySelector("span:first-child").innerHTML.includes("Your Display Name")) { | |
console.log("My tweet"); | |
tweet.querySelectorAll('[data-testid="caret"]')[0].scrollIntoView(); |
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
git pull | |
echo "Git pull done, fetching timetable..." | |
for branch | |
in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; | |
done | sort -r |
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
UPDATE wp_postmeta | |
SET `meta_value` = 'outofstock' | |
WHERE `meta_value` = 'instock' | |
AND `meta_key` = '_stock_status' |
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
SELECT ID | |
FROM `wp_posts` | |
WHERE ID | |
NOT IN (select `post_id` from `wp_postmeta` WHERE `meta_key`="_thumbnail_id") | |
AND `post_type`="product" |
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
SELECT `meta_value`, `meta_key`, count(*) | |
FROM wp_postmeta WHERE meta_key LIKE '_sku' | |
GROUP BY `meta_value` | |
ORDER BY `count(*)` DESC |
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
SELECT meta_value | |
FROM wp_postmeta | |
WHERE meta_key = '_sku' | |
AND meta_value != '' | |
GROUP BY meta_value HAVING COUNT(meta_value) > 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
UPDATE `wp_postmeta` | |
SET `meta_value` = 'no' | |
WHERE `meta_key` = '_sold_individually' |
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
UPDATE `wp_postmeta` | |
SET `meta_value` = 'yes' | |
WHERE `meta_key` = '_manage_stock' |
NewerOlder