Skip to content

Instantly share code, notes, and snippets.

View alane019's full-sized avatar

Adam Lane alane019

  • Ohio
View GitHub Profile
@alane019
alane019 / bulk-rename.ps1
Created October 12, 2019 17:10 — forked from ethangardner/bulk-rename.ps1
Powershell script to bulk replace spaces with underscores in a directory of files
Dir | Rename-Item –NewName { $_.name –replace “ “,”_” }
@alane019
alane019 / gist:5092a77ed24177349543b746f4764c25
Created January 2, 2020 00:56
VBA for Microsoft Word: Add a black, solid line border all pictures in a Word document
Sub borders()
'
' borders Macro
'
'There should be a way to make this the default styling for all images pasted into a Word document, in my opinion.
' Adds black solid line borders to all images in word document
' Source:
'
Dim pic As InlineShape
For Each pic In ActiveDocument.InlineShapes
@alane019
alane019 / udemy-video-header.js
Last active June 9, 2021 07:14
Udemy header bar display current video lesson name instead of course name (Chrome console snippet)
document.querySelector("#udemy > div.main-content-wrapper > div.main-content > div > div > div > div > header > div.header--course-details--3Swxk > h1 > a").innerText = document.querySelector("#tabs--3-content-4 > div > span > div > div:nth-child(1) > div.lecture-bookmark-v2--bookmark-header--2JV49 > div.lecture-bookmark-v2--section-actions-container--39_Ok > div.fx.lecture-bookmark-v2--section-description--2wldi > div.item-link.item-link--common--RP3fp.lecture-bookmark-v2--intro--132ek").innerText
@alane019
alane019 / hertz-notes-oscillator-beeps.js
Created March 6, 2020 05:18
//declare hertz Notes object and create oscillator audio context. // call notes from hn json object, plugging them into oscillator audio context, using the k function(gain, freq, duration). //try incorporating loops to create repeating melodies.
//declare hertz Notes object and create oscillator audio context.
// call notes from hn json object, plugging them into oscillator audio context, using the k function(gain, freq, duration).
//try incorporating loops to create repeating melodies.
//Note naming convention: "s" indicates sharp, and "b" indicates flat. The octave number applies to both for the half steps.
let hnStr ='{"c0":16.35,"csDb0":17.32,"d0":18.35,"dsEb0":19.45,"e0":20.6,"f0":21.83,"fsGb0":23.12,"g0":24.5,"gsAb0":25.96,"a0":27.5,"asBb0":29.14,"b0":30.87,"c1":32.7,"csDb1":34.65,"d1":36.71,"dsEb1":38.89,"e1":41.2,"f1":43.65,"fsGb1":46.25,"g1":49,"gsAb1":51.91,"a1":55,"asBb1":58.27,"b1":61.74,"c2":65.41,"csDb2":69.3,"d2":73.42,"dsEb2":77.78,"e2":82.41,"f2":87.31,"fsGb2":92.5,"g2":98,"gsAb2":103.83,"a2":110,"asBb2":116.54,"b2":123.47,"c3":130.81,"csDb3":138.59,"d3":146.83,"dsEb3":155.56,"e3":164.81,"f3":174.61,"fsGb3":185,"g3":196,"gsAb3":207.65,"a3":220,"asBb3":233.08,"b3":246.94,"c4":261.63,"csDb4":277.18,"d4":293.66,"dsEb4":311.13,"e4":32
@alane019
alane019 / ICS.php
Created August 21, 2020 04:05 — forked from jakebellacera/ICS.php
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
@alane019
alane019 / clear-watch-later-playlist.js
Last active October 14, 2024 23:50
Delete remove all videos from Youtube "Watch Later" playlist (working as of 12/14/2020)
// This script can be used to clear all videos from youtube's built-in "watch later" playlist which has a limit of 5,000 videos.
// Without this, you would need to click the remove button on each video in the list.
// Youtube made changes recently that caused errors for a previously working script.
// Script written by: janthedeveloper (https://github.com/JanTheDeveloper)
// Bookmark wrapper added by: shelldonhull (https://github.com/sheldonhull)
// Full conversation here: https://gist.github.com/astamicu/eb351ce10451f1a51b71a1287d36880f#file-readme-md
// 1. Save the javascript text below as a bookmark in google chrome(Simply replace the URL field in any existing bookmark, and give the bookmark any name)
@alane019
alane019 / colorbox.less
Created April 18, 2021 03:06 — forked from danshearmur/colorbox.less
Using colorbox with bootstrap
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:10001; overflow:hidden;}
#cboxOverlay{position:fixed; width:100%; height:100%;}
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
#cboxContent{position:relative;}
#cboxLoadedContent{overflow:auto;}
#cboxTitle{margin:0;}
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
.cboxPhoto{float:left; margin:auto; border:0; display:block;}
.cboxIframe{width:100%; height:100%; display:block; border:0;}