Skip to content

Instantly share code, notes, and snippets.

View m0pfin's full-sized avatar
:octocat:
Working from home

m0pfin

:octocat:
Working from home
View GitHub Profile
@m0pfin
m0pfin / massLoginFB.py
Last active September 30, 2020 22:17
Python скрипт для массовой авторизации в ФБ (Подробнее: https://vk.com/bearded_cpa)
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.ui import Select
import re
import time
@m0pfin
m0pfin / aezkme.py
Created September 20, 2020 07:59
AEZAKMI: Automate token extract & Login account
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.ui import Select
import time
import sys
@m0pfin
m0pfin / spintax.php
Created June 19, 2020 23:14 — forked from irazasyed/spintax.php
PHP: Text Spinner Class - Nested spinning supported.
<?PHP
/**
* Spintax - A helper class to process Spintax strings.
*
* @author Jason Davis - https://www.codedevelopr.com/
*
* Tutorial: https://www.codedevelopr.com/articles/php-spintax-class/
*
* Updated with suggested performance improvement by @PhiSYS.
<?php
class fbBusinessManager extends dbFbManager
{
//constructor
function __construct() {
}
//Define idFanpage
@m0pfin
m0pfin / createAd.php
Created June 9, 2020 14:29
FbCreateAd
<?php
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to
* use, copy, modify, and distribute this software in source code or binary
* form for use in connection with the web services and APIs provided by
* Facebook.
*
* As with any software that integrates with the Facebook platform, your use
@m0pfin
m0pfin / alertOffInIndigo
Created May 18, 2020 21:06
AppleScript
-- Отключаем уведомления в аккаунте
set myLink to "https://facebook.com/adsmanager"
tell application "Chromium"
activate
delay 2
execute active tab of window 1 javascript "var rsa = new RegExp('selected_account_id\"?:\"(.*?)\"');
var msa = document.documentElement.innerHTML.match(rsa);
-- Достаём токен из AdsManager FB, в INIDGO
set myLink to "https://facebook.com/adsmanager"
tell application "Chromium"
activate
open location myLink
delay 5
execute active tab of window 1 javascript "var re = new RegExp('access_token\"?:\"(.*?)\"');
var m = document.documentElement.innerHTML.match(re);
@m0pfin
m0pfin / addAccFBtool
Created May 18, 2020 17:45
AppleScript
-- Добавляем токен в ФБтул
set token to (the clipboard)
do shell script "curl --location --request POST 'https://fbtool.pro/api/add-account?key=API_KEI_FBTOOL' --form 'token=" & token & "' --form 'name=Auto' --form 'group=ID_GOUP'"
@m0pfin
m0pfin / readFileInLine
Created May 14, 2020 00:11
AppleScript - читаем файл построчно и копируем в буффер обмена
# Determine the input file's path.
set srcFile to ((path to desktop) as text) & "myFile.txt"
# Read lines from file.
set lns to paragraphs of (read file srcFile as «class utf8»)
# Loop over lines read and copy each to the clipboard.
repeat with ln in lns
set the clipboard to ln
display alert (the clipboard)
@m0pfin
m0pfin / tokenExtractIndigo
Created May 8, 2020 11:28
AppleScript - на автомате достаём токен в буффер обмена из INDIGO на MacOS
-- Достаём токен из AdsManager FB, в INIDGO
set myLink to "https://facebook.com/adsmanager"
tell application "Chromium"
activate
open location myLink
delay 5
execute active tab of window 1 javascript "var re = new RegExp('access_token\"?:\"(.*?)\"');
var m = document.documentElement.innerHTML.match(re);