Skip to content

Instantly share code, notes, and snippets.

View alexTitakoff's full-sized avatar
🏠
Working from home

Alex Titakoff alexTitakoff

🏠
Working from home
View GitHub Profile
@alexTitakoff
alexTitakoff / circle-css-loader.markdown
Created September 13, 2022 19:31
Circle css loader

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',
@alexTitakoff
alexTitakoff / node-horoscope-getting.js
Created December 26, 2018 14:12
простое потягивания данный из getов
let link = 'https://horoscopes.rambler.ru/api/front/v1/horoscope/today/taurus/'
var http = require('http');
// var options = {
@alexTitakoff
alexTitakoff / waitFunction.js
Created December 25, 2018 23:41
не секретный гист waitFunction
let conditionParam = 0
function conditionFunc() { // Какая то функция или действие в интерфейсе состояние которого мы ожидаем
if (conditionParam != 5) {
setTimeout(() => {
conditionParam++
console.log('conditionFunc')
return conditionFunc()
@alexTitakoff
alexTitakoff / findWithAttr.js
Last active December 25, 2018 23:38
== нахождение объекта в массиве по атрибуту
function findWithAttr(array, attr, value) {
for(var i = 0; i < array.length; i += 1) {
if(array[i][attr] === value) {
return i;
}
}
return -1;
}
for(let i; i < arr.length; i++){
if (arr[i].p_id != null) {
new_arr.push(arr[i])
}else {
}
}
@alexTitakoff
alexTitakoff / gist:2c86e07010ce8a7e62ab557a66e3c1e7
Created October 19, 2016 01:27 — forked from tonymtz/gist:d75101d9bdf764c890ef
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*