This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import commands | |
import json | |
def update(): | |
"""Return list of users without MFA, or an OK status.""" | |
status, data = commands.getstatusoutput("curl -s -H \"Authorization: token YOUR_GITHUB_TOKEN\" https://api.github.com/orgs/ORG_NAME/members?filter=2fa_disabled") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
require 'rubygems' | |
require 'json' | |
class Widget | |
def initialize(id,title,view,order) | |
@widget_id = id | |
@widget_view = view | |
@widget_title = title | |
@widget_order = order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
refreshFrequency: false | |
render: () -> | |
return ''' | |
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'snmp' | |
# Populate the graph with some random points | |
@inbound_points = [] | |
@outbound_points = [] | |
@inbound_long = [] | |
@outbound_long = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH=/Users/mknowles/Documents/BitBucket/belfry:/Users/mknowles/Dropbox\ \(Personal\)/Tech\ Tools/scripts:$PATH | |
export PYTHONPATH="${PYTHONPATH}:/Users/mknowles/git/skytap" | |
#export MAGICK_HOME="/usr/local/bin/ImageMagick-6.9.2" | |
#export PATH="$MAGICK_HOME/bin:$PATH" | |
#export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib/" | |
# source ~/Git/liquidprompt/liquidprompt | |
# source /Users/mknowles/Dropbox\ \(Personal\)/Tech\ Tools/scripts/switch.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" to set quitapps to name of every application process whose visible is true and name is not "Finder" | |
repeat with closeall in quitapps | |
quit application closeall | |
end repeat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application id "com.evernote.Evernote" | |
-- Move/tag Fitbit status updates | |
set note_query to "notebook:triage source:mail.* fitbit" | |
set myNotes to find notes note_query | |
repeat with CurrentNote in myNotes | |
assign tag "fitbit" to CurrentNote | |
move CurrentNote to notebook "Michael" | |
end repeat | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type='text/javascript'> | |
$(function() { | |
// These settings override the defaults set in application.coffee. You can do this on a per dashboard basis. | |
Dashing.widget_base_dimensions = [356, 470] | |
Dashing.widget_margins = [5, 5] | |
Dashing.numColumns = 3 | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -version 2.0 | |
#this script assumes all users have the same policy and does | |
#not take fine grained password policies into account. | |
#The -Next parameter indicates how many days to check. In other words | |
#user accounts with expiring passwords in the next X days. The script | |
#defaults to the user domain, but you can specify another search base | |
#by using a distinguished name like ou=employees,dc=jdhlab,dc=local |