Skip to content

Instantly share code, notes, and snippets.

@enxoco
enxoco / index.html
Created June 17, 2019 12:15
bridgeScholars 9th grade
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="./style.css">
</head>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-111383435-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function countUp(t,e,i,o,s,a){this.options=a||{useEasing:!0,useGrouping:!0,separator:",",decimal:"."};for(var n=0,r=["webkit","moz","ms"],l=0;l<r.length&&!window.requestAnimationFrame;++l)window.requestAnimationFrame=window[r[l]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[r[l]+"CancelAnimationFrame"]||window[r[l]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t,e){var i=(new Date).getTime(),o=Math.max(0,16-(i-n)),s=window.setTimeout(function(){t(i+o)},o);return n=i+o,s}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)});var d=this;this.d="string"==typeof t?document.getElementById(t):t,this.startVal=Number(e),this.endVal=Number(i),this.countDown=this.startVal>this.endVal,this.startTime=null,this.timestamp=null,this.remaining=null,this.frameVal=this.startVal,this.rAF=null,this.decimals=Math.max(0,o||0),this.dec=Math.pow(10,this.decimals),this.duration=1e3*s||2e3,this.easeOutExpo=function(t,e,i,o){return i*
@enxoco
enxoco / SetProxy.ps1
Created March 20, 2018 18:56
Set up system proxy on Windows via powershell.
$port=$args[0]
$password=$args[1]
Set-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -Name AutoConfigURL -Value "http://00.adam.nxone.co:$port/proxy.pac?a=$password"
Write-Host "Set Autoconfig setting"
Set-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -Name ProxyEnable -value 1
Write-Host "Enabled Proxy"
$signature = @'
[DllImport("wininet.dll", SetLastError = true, CharSet=CharSet.Auto)]
@enxoco
enxoco / parseGoogleSearches.sh
Last active February 1, 2018 18:23
This is a one line to parse out google search parameters.
#!/bin/bash
#This is currently a one liner that I use against a Redwood access log to strip out just the date, username and search terms
#For my users.
#This is the old way I was doing it.
grep google.com /var/log/redwood/access.log | grep -Ev 'carddav|calendar|inbox.google.com|ssl-bump|clients3.google.com|mail.google.com|gstatic.com' | grep search | grep q= | awk -F',' '{print $1","$2","$4}' | sort | uniq | sed 's/q=/ql=,/g' | awk -F',' '{print $1","$2","$4}' | sort | uniq | awk -F',' '!seen[$3]++' | sed 's/&/,&/g' | awk -F',' '{print$1","$2","$3}' | sed 's/%20/ /g'
#This is a better approach. The above code will return all of the requests that are sent to the autorequest engine, while this script excludes those and only returns us the actual search terms
grep "google.com/search?" /var/log/redwood/access.log | grep -v google.com/search/complete | sed -e 's/&q=/,/g; s/&/,/g; s/+/ /g' | awk -F, '{print$1","$2","$3","$4}' | sed 's/q=/,/g' | awk -F, '{print $1","$2","$3","$5}' | awk '$4!=""'