Skip to content

Instantly share code, notes, and snippets.

View marius-zenitech's full-sized avatar

marius-zenitech

View GitHub Profile
@marius-zenitech
marius-zenitech / fake-referrer.phantom.js
Created August 12, 2018 08:30 — forked from liusheng6982/fake-referrer.phantom.js
Fake Referrer with Phantomjs
var system = require('system');
// Exit in case of wrong parameter count.
if (system.args.length !== 3) {
console.log('Usage: scriptname targetUrl referrer');
console.log('example: $> phantomjs fake-referrer.phantom.js http://example.com http://referrer.example.com');
phantom.exit();
}
// Set the important pieces
// googletesting.js
casper.test.begin('Google search retrieves 10 or more results', 5, function suite(test) {
casper.start("http://www.google.fr/", function() {
test.assertTitle("Google", "google homepage title is the one expected");
test.assertExists('form[action="/search"]', "main form is found");
this.fill('form[action="/search"]', {
q: "casperjs"
}, true);
});
# Install repository in centos 7
sudo yum install http://mirrors.kernel.org/fedora-epel/7/x86_64/e/epel-release-7-5.noarch.rpm
# Update install catalog
sudo yum update
# Install the required development tools
sudo yum groupinstall Development Tools
# Install the required python tools
@marius-zenitech
marius-zenitech / redirect_hunter.js
Created June 20, 2018 06:16 — forked from trietptm/redirect_hunter.js
Simple CasperJS script to load page with fake referrer and follow all redirects. The HTML for the final page is printed along with the redirect URLs.
//setup casper
var casper = require('casper').create({
verbose: true,
//Fake the user agent
pageSettings: {
userAgent: 'Mozilla/5.0 (Windows NT 5.1; chromeframe/25.0.1364.152) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22'
},
logLevel: "debug"
//logLevel: "error"
@marius-zenitech
marius-zenitech / stuff_to_del.bat
Created March 20, 2018 09:24 — forked from Gaspadlo/stuff_to_del.bat
Fastest possible way to delete large number of files/folders for MS Win (thousands to millions of folders)
@echo off
cd /d %~dp0
set /p Input=Enter Folder name to delete:
:ConfPromt
set /p Confirm=Are you sure you want to delete "%CD%\%Input%"?(y/n):
IF /I "%Confirm%" == "n" (
Echo Canceling.
pause
EXIT /b
)
@marius-zenitech
marius-zenitech / hipster-filler.js
Created October 19, 2017 08:08 — forked from Error601/hipster-filler.js
Hipster filler text generator.
/*!
* Hipster filler text generator.
* Inspired by (and words taken from):
* http://hipsum.co/
*
* Usage:
*
* // sentences only
* APP.utils.hipster.sentence(); // generates 1 sentence with 9, 12, or 18 words
* APP.utils.hipster.sentences(3); // generates 3 sentences
@marius-zenitech
marius-zenitech / gist:d0185c96e34d9b3fa92a4e3b4f2c09fd
Created May 30, 2017 17:32 — forked from siliconvallaeys/gist:05ddc05c019bb2430386dae9f6b66367
Track AdWords Account, Campaign, and Ad Group Quality Score
// Account, Campaign, and Ad Group Level Quality Score
// -------------------------------------------------
// Script created by Frederick Vallaeys
// Optmyzr - http://www.optmyzr.com http://www.optmyzr.com/enhanced-scripts-for-adwords
// Copyright 2012-2016 - Optmyzr Inc.
//
function main() {
@marius-zenitech
marius-zenitech / Manage Stacked or Tiered Keyword Bids.js
Created May 30, 2017 17:32 — forked from siliconvallaeys/Manage Stacked or Tiered Keyword Bids.js
Helps find when your stacked bids by match type are not following your stratregy
/*
// AdWords Script: Check and set keyword bids for stacked (tiered) bid strategy
// -----------------------------------------------------------------------------
// Copyright 2017 Optmyzr Inc., All Rights Reserved
//
// This script helps you compare bids for the same keyword in multiple match types
// It can output just keywords for which a less restrictive match type has equal or higher bids (mode 1)
// or it can output all keywords so you can see the bids by match type (mode 2)
//
// New bids can be generated and uploaded with the spreadsheet through Bulk Uploads. The file is NOT compatible with AdWords Editor.
@marius-zenitech
marius-zenitech / v1.js
Created May 30, 2017 17:32 — forked from siliconvallaeys/v1.js
Set AdWords Budgets To Meet Monthly Targets With Day Of Week Allocation
// Copyright 2015, Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@marius-zenitech
marius-zenitech / Search Query Mining Tool.js
Created May 30, 2017 17:29 — forked from BrainlabsDigital/Search Query Mining Tool.js
Search Query Mining Tool script to calculate the performance of n-grams
/**
*
* Search Query Mining Tool
*
* This script calculates the contribution of each word or phrase found in the
* search query report and outputs a report into a Google Doc spreadsheet.
*
* Version: 2.2
* Updated 2015-09-17: replacing 'KeywordText' with 'Criteria'
* Updated 2016-10-11: replacing 'ConvertedClicks' with 'Conversions'