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 fs = require('fs') | |
| const path = require('path') | |
| const files = process.argv.slice(2) | |
| function convertFile (filePath) { | |
| let src = fs.readFileSync(filePath, 'utf8') | |
| const original = src | |
| // 1. const X = require('y') → import X from 'y' |
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 fs = require('fs') | |
| const path = require('path') | |
| const files = process.argv.slice(2) | |
| function convertFile (filePath) { | |
| let src = fs.readFileSync(filePath, 'utf8') | |
| const original = src | |
| // 1. import X from 'y' → const X = require('y') |
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 http.client | |
| import json | |
| conn = http.client.HTTPSConnection("insights.sandbox.africastalking.com") | |
| payload = json.dumps({ | |
| "username": "sandbox", | |
| "phoneNumbers": [ | |
| "+2547XXXXXXX" | |
| ] | |
| }) |
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
| // Go to your twitter profile page, and paste in console | |
| const undoRetweet = async () => { | |
| try { | |
| const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms)); | |
| for (var i = 1; i < 500; i++) { | |
| window.scrollTo(0, document.body.scrollHeight/2 || document.documentElement.scrollHeight/2) | |
| await sleep(100) | |
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
| // 2024 works with x.com | |
| // Go to your twitter profile page, and paste in console | |
| setInterval(() => { | |
| document.querySelectorAll('button[data-testid="unlike"]').forEach(button => button.click()); | |
| window.scrollTo(0, document.body.scrollHeight || document.documentElement.scrollHeight) | |
| },1000); |
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
| // install the africastalking library from npmjs.org | |
| const Africastalking = require('africastalking'); | |
| const AT = Africastalking({ | |
| username:'your-app-username', | |
| apiKey:'your-apikey' | |
| }); | |
| const sendSMS = async () => { | |
| const output = await AT.send({ |
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
| // install the africastalking library from npmjs.org | |
| const Africastalking = require('africastalking'); | |
| const AT = Africastalking({ | |
| username:'your-app-username', | |
| apiKey:'your-apikey' | |
| }).AIRTIME; | |
| const sendAirtime = async () => { | |
| const output = await AT.send({ |
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 timer = ms => new Promise(res => setTimeout(res, ms)); | |
| setInterval(async () => | |
| { | |
| // Get all tweets | |
| const allTweets = document.querySelectorAll('.css-1dbjc4n.r-18u37iz.r-1wbh5a2.r-13hce6t'); | |
| // Filter tweets | |
| const filteredTweets = Array.prototype.slice.call(allTweets).filter(x => x.innerText === '@{YOUR_TWITTER_NICKNAME}'); // --> e.g. '@twitter' |
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 timer = ms => new Promise(res => setTimeout(res, ms)); | |
| // Unretweet normally | |
| const unretweetTweet = async (tweet) => { | |
| await tweet.querySelector('div[data-testid="unretweet"]').click(); | |
| await timer(250); | |
| await document.querySelector('div[data-testid="unretweetConfirm"]').click(); | |
| console.log('****// Unretweeted Successfully //****') | |
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder