Skip to content

Instantly share code, notes, and snippets.

$t_path_7 = "C:\Users\$env:username\AppData\Local\Microsoft\Windows\Temporary Internet Files"
$c_path_7 = "C:\Users\$env:username\AppData\Local\Microsoft\Windows\Caches"
$d_path_7 = "C:\Users\$env:username\Downloads"
$temporary_path = Test-Path $t_path_7
$check_cashe = Test-Path $c_path_7
$check_download = Test-Path $d_path_7
if($temporary_path -eq $True -And $check_cashe -eq $True -And $check_download -eq $True)
@kodekracker
kodekracker / set_virtual_host.sh
Last active December 10, 2017 18:17
A shell script file to create a virtual host on apache server to host your website , just copy this script in your root directory of website and set the SERVER_IP,HOST_NAME variable in the file, change the executable permission and run it.This will automatically add your virtual-host and runs your website at a specified host name.
#!/bin/bash
# Author : Akshay Pratap Singh
# Email-id : pratapakshay0@gmail.com
# These variable are sets by user
SERVER_IP="127.0.0.1"
HOST_NAME="example.com"
DIR_PATH=$(pwd)
APACHE_DIR_PATH="/etc/apache2/sites-available"
@mhawksey
mhawksey / gist:9199459
Last active February 16, 2022 11:13
Google Apps Script snippet to send tracking data to Google Analytics using the Measurement Protocol
function onOpen(){
// example send for Sheets
sendGAMP("UA-XXXX-1", SpreadsheetApp.getActiveSpreadsheet().getUrl());
// example send for Documents
//sendGAMP("UA-XXXX-1", DocumentApp.getActiveDocument().getUrl());
// example send for Forms *NOTE* getUrl not implemented yet in New Sheets
//sendGAMP("UA-XXXX-1", FormApp.getActiveForm().getUrl());
}