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
// // Fast auto-scroll script that stops when reaching the bottom of the page | |
// (function() { | |
// // Configuration - INCREASED SPEED | |
// const scrollSpeed = 10; // pixels per interval (increased from 1) | |
// const scrollInterval = 10; // milliseconds between scrolls (decreased from 20) | |
// // Variables | |
// let isScrolling = false; | |
// let scrollIntervalId = null; | |
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
export type Tweet = { | |
id: string; | |
text: string; | |
media_urls?: string[]; | |
likes: number; | |
user: User; | |
replies?: Tweet[]; | |
}; | |
export type User = { |
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
function getAllTweets() { | |
const TWITTER_SEARCH_URL = | |
"https://x.com/that_anokha_boy"; | |
const SCROLL_INTERVAL = 1000; | |
const SCROLL_STEP = 5000; | |
const MAX_UNCHANGED_COUNT = 10; | |
if (!location.href.startsWith(TWITTER_SEARCH_URL)) { | |
console.log("Not on the correct Twitter search page. Exiting."); | |
return; |
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 { readFileSync, readdirSync, statSync, writeFileSync } from "node:fs"; | |
import ignore from "ignore"; | |
import { join } from "node:path"; | |
const ig = ignore(); | |
try { | |
ig.add(readFileSync(".gitignore", "utf8")); | |
} catch (err) { | |
console.log("No .gitignore file found, proceeding without ignore rules"); | |
} |
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
/** | |
* cloudflare-worker-youtube-dl.js | |
* Get direct links to YouTube videos using Cloudflare Workers. | |
* | |
* Usage: | |
* GET /?v=dQw4w9WgXcQ | |
* -> Returns a JSON list of supported formats | |
* | |
* GET /?v=dQw4w9WgXcQ&f=251 | |
* -> Returns a stream of the specified format ID |
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 { google } = require('googleapis'); | |
const keys = require('./keys.json'); | |
const scopes = ["https://www.googleapis.com/auth/spreadsheets"]; | |
const SHEET_ID = '1hh1PUVUL_mKLrbawt72X1jh9jOA9REUIwDpf0PmO0yo'; | |
const SHEET_NAME = 'Sheet1'; | |
const client = new google.auth.JWT( | |
keys.client_email, |
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
#!/bin/bash | |
FLUTTER_LIB_DIR="./lib" | |
FLUTTER_PID=$(pgrep -fl "flutter.*run" | awk '{print $1}') | |
echo "Stored Flutter PID: $FLUTTER_PID" | |
if [ -z "$FLUTTER_PID" ]; then | |
echo "Flutter process not found. Ensure 'flutter run' is executing." | |
exit 1 |
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
function git_history { | |
git log $filename | grep "Date: " | |
} | |
function first_commit { | |
git_history | tail -1 | |
} | |
function last_commit { | |
git_history | head -1 |
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 'dart:async'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter_soloud/flutter_soloud.dart'; | |
class NewAudioPlayerService extends ChangeNotifier { | |
static NewAudioPlayerService? _instance; | |
final SoLoud soloud = SoLoud(); | |
SoundProps? currentSound; | |
StreamController<StreamSoundEvent> soundEvents = StreamController.broadcast(); |
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 'package:flutter/material.dart'; | |
import 'dart:math'; | |
void main() => runApp(const MyApp()); | |
class MyApp extends StatelessWidget { | |
const SolarEmulatorApp({super.key}); | |
@override |
NewerOlder