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
| (async () => { | |
| const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms)); | |
| console.log("🚀 เริ่มต้นระบบ Unfollow แบบมีดีเลย์..."); | |
| while (true) { | |
| // หา UserCell ทั้งหมดบนหน้าจอ | |
| const userCells = document.querySelectorAll('[data-testid="UserCell"]'); | |
| let processedInThisTurn = 0; |
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 to click all buttons with the text 'Follow' | |
| function clickFollowButtons() { | |
| // Get all button elements on the page | |
| var buttons = document.querySelectorAll('div div div span span'); | |
| // Initialize a delay variable | |
| var delay = 0; | |
| // Iterate through each button | |
| buttons.forEach(function(button) { |
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 to click all buttons with the text 'Follow' | |
| function clickFollowButtons() { | |
| // Get all button elements on the page | |
| var buttons = document.querySelectorAll('button'); | |
| // Initialize a delay variable | |
| var delay = 0; | |
| // Iterate through each button | |
| buttons.forEach(function(button) { |
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
| require 'gtk3' | |
| require 'rmagick' | |
| class ImageBrowser | |
| def initialize(interval) | |
| @folder = get_folder_from_user | |
| @interval = interval | |
| @images = load_images | |
| @current_image_index = 0 | |
| end |
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 fileseq { | |
| a=1 | |
| for i in *; do | |
| if file -b --mime-type "$i" | grep -q '^image/'; then | |
| date=$(date +%Y%m%d) | |
| new="${date}-${a}.${i##*.}" | |
| mv -i -- "$i" "$new" | |
| let a=a+1 | |
| fi | |
| done |
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
| class LottoService | |
| URL = 'https://lotto.api.rayriffy.com' | |
| def initialize(list = []) | |
| @list = [ | |
| "608422", | |
| "806874", | |
| "622593", | |
| "851085", | |
| "227936", |
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
| require 'active_record/connection_adapters/postgresql/schema_statements' | |
| module ActiveRecord | |
| module ConnectionAdapters | |
| module PostgreSQL | |
| module SchemaStatements | |
| # Resets the sequence of a table's primary key to the maximum value. | |
| def reset_pk_sequence!(table, pk = nil, sequence = nil) #:nodoc: | |
| unless pk and sequence | |
| default_pk, default_sequence = pk_and_sequence_for(table) |
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
| After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
| The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
| Database files have to be updated before starting the server, here are the steps that had to be followed: | |
| # need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
| brew unlink postgresql | |
| brew install postgresql@9.6 | |
| brew unlink postgresql@9.6 | |
| brew link postgresql |
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
| $ vi ~/.xrayconfig | |
| ``` | |
| --- | |
| :editor: /usr/local/bin/code | |
| ``` |
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
| Open irbrc file: | |
| $ vi ~/.irbrc | |
| Paste lines: | |
| require "awesome_print" | |
| AwesomePrint.irb! |
NewerOlder