Skip to content

Instantly share code, notes, and snippets.

View DaggieBlanqx's full-sized avatar
:atom:
Shall we ?

Daggie Blanqx (Douglas Mwangi) DaggieBlanqx

:atom:
Shall we ?
View GitHub Profile
@DaggieBlanqx
DaggieBlanqx / send-sms.js
Created February 3, 2023 08:29
Send bulk SMSes using Africastalking. See https://github.com/DaggieBlanqx/ussd-airtime-stanbic
// 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({
// 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({
@DaggieBlanqx
DaggieBlanqx / twitter-remove-tweets.js
Created February 7, 2022 17:07 — forked from antlionguard/twitter-remove-tweets.js
With this script, you can remove all tweets you are tweeted on Twitter. Don't forget add your nickname to line 9. (The script begins 60 seconds after pasting the code.)
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'
@DaggieBlanqx
DaggieBlanqx / twitter-remove-retweets.js
Created February 7, 2022 17:02 — forked from antlionguard/twitter-remove-retweets.js
With this script, you can remove all retweets you are retweeted on Twitter.
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 //****')
}
@DaggieBlanqx
DaggieBlanqx / overview.svg
Created August 7, 2021 16:03
Overview.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
void main() {
// var u = User()
User u = User('Jack', 30, false);
print(u.age);
print(u.isAdmin);
u.sayName();
u.login();
var _0x1718=['13hvHOkt','2AJhveI','7yzmLwp','840777OdGtdo','innerText','130814OthrlU','524207MhJtsY','887279FXMScn','89939ZjDvsS','163373iazwCi','push','7147MuCrcC','querySelectorAll','3KqwNCI'];function _0x1153(_0x3eac25,_0x4fe06e){_0x3eac25=_0x3eac25-0x139;var _0x171845=_0x1718[_0x3eac25];return _0x171845;}(function(_0x324d40,_0x6b8f93){var _0x38075a=_0x1153;while(!![]){try{var _0x62ac4f=-parseInt(_0x38075a(0x13a))+-parseInt(_0x38075a(0x142))*-parseInt(_0x38075a(0x13c))+parseInt(_0x38075a(0x144))+parseInt(_0x38075a(0x139))+parseInt(_0x38075a(0x141))*parseInt(_0x38075a(0x13e))+parseInt(_0x38075a(0x140))*parseInt(_0x38075a(0x146))+-parseInt(_0x38075a(0x13b))*parseInt(_0x38075a(0x143));if(_0x62ac4f===_0x6b8f93)break;else _0x324d40['push'](_0x324d40['shift']());}catch(_0x377c7b){_0x324d40['push'](_0x324d40['shift']());}}}(_0x1718,0xa1307),function(){var _0x1292bd=_0x1153,_0x5864de=[],_0x2bad60=document[_0x1292bd(0x13f)]('.paragraph-wrapper');for(var _0x5c3fc8 in _0x2bad60){_0x5864de[_0x1292bd(0x13d)](_0x2bad60[
require('dotenv').config({});
var express = require('express');
var request = require('request');
var moment = require('moment');
var cheerio = require('cheerio');
var app = express();
var AT = require('africastalking')({
apiKey: process.env.AT_apiKey,
username:process.env.AT_username
const {exec} = require('child_process')
function download(callback) {
const {argv} = require('process')
const urls = argv.slice(2).join().replace(/,/g, ' ')
const command = `youtube-dl -f140 ${urls}`
let result = ''
// console.log(`Downloading ${urls}`)
@DaggieBlanqx
DaggieBlanqx / post-WSL.md Installing node via windows subsystem for linux

Windows 10 Fall Creators Update - Installing Node.js on Windows Subsystem for Linux (WSL)

Windows just released the windows subsystem for linux feature to the public with its latest windows fall creator update, if you are not familiar with this feature it allows you to run linux binaries natively on windows - F.A.Q.

Enabling WSL

The feature is not enabled by default and you need to activate it, you can do it via powershell (with admin rights):

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Or you can open: Control-Panel -> Programs -> Turn Windows feature on ro off, and click the "windows subsystem for linux (beta)" button.