Skip to content

Instantly share code, notes, and snippets.

View nicoleahmed's full-sized avatar

Nicole Ahmed nicoleahmed

View GitHub Profile
@pinecones-sx
pinecones-sx / Open-OneNoteNotebook.ps1
Created November 8, 2016 21:01
Open-OneNoteNotebook powershell function -- lets you open OneNote Notebooks
<# Open-OneNoteNotebook
Pass in the UNC path of a OneNote notebook folder, then this will add it to the
list of opened notebooks in OneNote.
Ex:
Open-OneNoteNotebook '\\consanto\public\KnowledgeBase\'
#>
If (-Not (Test-Path function:global:Open-OneNoteNotebook)) {
@pjmavadiya
pjmavadiya / last-modified.py
Created October 20, 2016 09:19
Python : Determine last modified time of a web page
#!/usr/bin/python2.7
import requests
import sys
from urlparse import urlparse
#This will return last modified time of given web page url
def get_last_modified(url):
result = urlparse(url)
if True if [result.scheme, result.netloc, result.path] else False:
header = requests.head(url).headers
@stefanmaric
stefanmaric / copy-to-clipboard-bookmarklet.md
Created September 7, 2016 20:54
Create Bookmarklet (browser bookmark that executes Javsacript) to copy a given text to Clipboard

Copy-to-clipboard Bookmarklet

Create Bookmarklet (browser bookmark that executes Javsacript) to copy a given text to Clipboard.

This is the base javascript:

(function (text) {
  var node = document.createElement('textarea')
  var selection = document.getSelection()
@jamesramsay
jamesramsay / README.md
Last active April 26, 2024 13:15
Gmail: delete old emails automatically

Gmail: delete old emails automatically

Automatically deletes old emails that match the specified label.

Get started

  • Create a new Google Apps Script at https://script.google.com
  • Overwrite the placeholder with the javascript below
  • Update the following constants:
  • LABEL_TO_DELETE: the label that should be have old messages deleted
@duzun
duzun / enableSelect-bookmarklet.html
Last active December 22, 2023 08:04
Enable Right Click and Text Selection Bookmarklet
<a class="btn btn-default btn-info bookmarklet" href="javascript:(function(d){var a=d.document,h=function(){},c=a.body||a.getElementsByTagName("body")[0],f=a.documentElement||a.getElementsByTagName("html")[0],k=[c,f,a],l=["webkit","khtml","moz","ms",""],g=["contextmenu","selectstart","select","mousedown","mouseup"],b=d.Selection,e=b&&b.prototype;e&&(e.removeAllRanges=h,b=a.selection)&&(b.clear=h);for(e=k.length;e--;)if(f=k[e]){for(b=g.length;b--;)f["on"+g[b]]=null;if(a=f.style)for(a.cursor="",a.webkitTouchCallout="initial",b=l.length;b--;)a[((c=l[b])?"-"+c+"-":c)+"user-select"]="initial"}(c=d.jQuery||d.Zepto)&&c(d).off(g)})(this);">
Enable Select
</a>
@caseywatts
caseywatts / 0 - Chrome Workshop.md
Last active August 30, 2023 06:48
Chrome Extension Workshop
@glombard
glombard / add-credential.bat
Created May 1, 2014 10:59
Use cmdkey to add a Git credential to the Windows Credential Manager
# to add a new Git credential to the Credential Manager:
cmdkey /generic:LegacyGeneric:target=git:https://github.com /user:username /pass:"mypassword"
# to list all credentials:
cmdkey /list
@deepak1556
deepak1556 / webp2png.js
Created December 7, 2013 17:30
webp support using libwebpjs (webp->png in canvas)
WebPDecodeAndDraw = function (data) {
var decoder = new WebPDecoder();
var bitmap = decoder.WebPDecode(data, data.length);
if (bitmap) {
//Draw Image
var output = ctx.createImageData(canvas.width, canvas.height);
var biWidth = canvas.width;
var outputData = output.data;
@aejay
aejay / AutoAcceptMeetings.vba
Created February 15, 2013 16:00
Quick Outlook macro to automatically accept a meeting request, and notify you that it has been accepted. Use the Alt+F11 combo to pull up the VBA editor. To utilize the function, you will need to add a rule that uses the "Run a script" action.
Sub AutoAcceptMeetings(oRequest As MeetingItem)
If oRequest.MessageClass <> "IPM.Schedule.Meeting.Request" Then
Exit Sub
End If
Dim oAppt As AppointmentItem
Set oAppt = oRequest.GetAssociatedAppointment(True)
Dim oResponse
@noahcoad
noahcoad / GoAwayModalDialogs.ahk
Created January 3, 2013 21:04
Automates away pesky modal dialogs.
; ==========================================================================================
; == Modal Dialog Automation
; ==
; == Automates away pesky modal dialogs by applying a default response when they pop up
; == Helper functions are at the bottom
; ==========================================================================================
; Defaults to fast no-regex title matching
SetTitleMatchMode, 2