Skip to content

Instantly share code, notes, and snippets.

View Vijaysinh's full-sized avatar
🌶️
Working from home

Vijaysinh Parmar Vijaysinh

🌶️
Working from home
View GitHub Profile
@Vijaysinh
Vijaysinh / README.md
Created August 8, 2017 05:36 — forked from mosampaio/README.md
Gmail Api OAuth Using Node.js Express - part 2

How to Run?

  • Make sure there is a mongodb instance running locally.

  • First export the environment variables.

export CLIENT_ID=your-client-id
export CLIENT_SECRET=your-client-secret
export DOMAIN_URL=your-domain-url
@Vijaysinh
Vijaysinh / .htaccess
Created July 18, 2018 03:16 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
<?php
/**
* Send a Message to a Slack Channel.
*
* Get the API Token visit: https://api.slack.com/custom-integrations/legacy-tokens
* The token will look like this `xoxo-250000090-0000000000-0000000000-dbssg`.
*
* @param string $message The message to post in channel.
* @param string $channel The name of the channel prefixed with #
* @return boolean
@Vijaysinh
Vijaysinh / phone-headers.php
Created January 16, 2019 17:41 — forked from neave/phone-headers.php
Mobile phone headers PHP example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=yes, minimum-scale=1.0">
<title>And your phone number is...</title>
<style>
body {
font: 17px sans-serif;
color: #444;
@Vijaysinh
Vijaysinh / Campaign Budget Overspend Monitoring
Created July 13, 2019 04:47 — forked from BrainlabsDigital/Campaign Budget Overspend Monitoring
Labels (and optionally pauses) campaigns that are overspending too much, and emails you a warning.
/**
*
* Campaign Budget Overspend Monitoring
*
* This script labels campaigns whose spend today is more than their daily
* budgets. Optionally, it also pauses campaigns whose spend exceeds the
* budget by too much. An email is then sent, listing the newly labelled
* and paused campaigns.
* When spend no longer exceeds budget, the campaigns are reactivated and
* labels are removed.
/**
* Ad Copy Length Analysis
*
* Download an ad performance report for the account and break up the
* information and aggregate by component lengths. This will create a sheet for
* Headline1, Headline2, Headline3, Description1, Description2, Path1, Path2
* and Headline/Description/Path, which concatenates the respective components.
*
* Google Ads Script
* @author Brainlabs
/**
*
* Extended Devices, Locations and Audiences Bidding
*
* Automatically apply modifiers to your devices, locations, in-market and remarketing audiences based on performance.
* It analyses search and display campaigns only.
*
* Version: 1.0
* Google Ads Script maintained on brainlabsdigital.com
*
@Vijaysinh
Vijaysinh / Change in Campaign Spending Alert.js
Created July 13, 2019 04:49 — forked from BrainlabsDigital/Change in Campaign Spending Alert.js
Script to alert you if a campaign's spend has changed dramatically
/**
*
* Change in Campaign Spending Alert
*
* This script uses the current hour to calculate how much has been spent on
* individual campaigns on the day of running. The average spend up to the
* current hour in a specified numbers of days previously is averaged. If the
* spend today is higher by a specified percentage threshold an alert email
* is sent.
*
@Vijaysinh
Vijaysinh / Duplicate Ad Detector.js
Created July 13, 2019 04:49 — forked from BrainlabsDigital/Duplicate Ad Detector.js
Script to find and label duplicated ads
/**
*
* Duplicate Ad Detector
* This script will find ads with identical text and URLs, and label
* one to keep and the rest to pause according to performance.
*
* Version: 1.0
* Google AdWords Script maintained by brainlabsdigital.com
*
**/
@Vijaysinh
Vijaysinh / memcached.php
Created August 9, 2019 11:48 — forked from raybogman/memcached.php
Memcached viewer for PHP
<?php
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2004 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |