Skip to content

Instantly share code, notes, and snippets.

View CanWeJam.rb
require 'open-uri'
require 'csv'
require 'ostruct'
target = open('https://raw.githubusercontent.com/isthisblocked/isthisblockedinmydepartment.ca/master/src/data/organizations.csv')
targetCSV = CSV.parse(target, headers: true)
orgNames = Hash.new
targetCSV.each do |x|
@KingBain
KingBain / waitForKeyElements.js
Created May 26, 2017 — forked from BrockA/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
View waitForKeyElements.js
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@KingBain
KingBain / Configure-AutoOn.ps1
Created Jun 15, 2016
Powershell script to configure BIOS Aut-On settings
View Configure-AutoOn.ps1
param(
[switch]$Clear,
[string]$Time,
[int]$Window,
[string[]]$Days
)
function Get-AutoOn(){
$object = New-Object -TypeName PSObject
try {
@KingBain
KingBain / Get-BitlockerProtection.ps1
Last active May 5, 2016
Bitlocker Compliance detection for C: drive.
View Get-BitlockerProtection.ps1
<#
*********************************************************************************************************
* *
*** This Powershell Script is used to get the Bitlocker protection status ***
* *
*********************************************************************************************************
* Created by Ioan Popovici, 13/11/2015 | Requirements Powershell 3.0 *
* ======================================================================================================*
* Modified by | Date | Revision | Comments *
*_______________________________________________________________________________________________________*
View RotateLogs.psi
<#
Public Domain License
Modified by kingbain
.SYNOPSIS
Clean up and rotate files
.DESCRIPTION
View gist:77f081a09be2840a14ec
status = sysDrive.EnableKeyProtectors()
if status <> 0 then
logger.LogError(now & " " & sysDrive.DeviceID & " Unable to resume bitlocker. Error: " & hex(status))
else
shell.RegDelete "HKEY_LOCAL_MACHINE\SOFTWARE\"&cicRegistryFolderName&"\"&registryFolder&"\WhenBitlockerPaused"
logger.Log(now & " Bitlocker has been resumed")
end if
@KingBain
KingBain / gist:7d3e76d97c3227847f20
Created Apr 24, 2015
Error install redmine_checklists plugin
View gist:7d3e76d97c3227847f20
D:\Redmine\3.0.1\apps\redmine\htdocs\plugins>bundle exec rake redmine:plugins NAME=redmine_checklists RAILS_ENV=production
DL is deprecated, please use Fiddle
(in D:/Redmine/3.0.1/apps/redmine/htdocs)
DL is deprecated, please use Fiddle
rake aborted!
NameError: undefined local variable or method `generated_feature_methods' for #<Class:0x67b0ff0>
D:/Redmine/3.0.1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
D:/Redmine/3.0.1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/protected_attributes-1.0.5/lib/active_record/mass_assignment_security/nested_attributes.rb:30:in `block in accepts_nested_attributes_for'
D:/Redmine/3.0.1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/protected_attributes-1.0.5/lib/active_record/mass_assignment_security/nested_attributes.rb:16:in `each'
D:/Redmine/3.0.1/apps/redmine/htdocs/vendor/bundle/ruby/2.0.0/gems/protected_attributes-1.0.5/lib/active_record/mass_assignment_security/nested_attribute
View gist:9120574
<VirtualHost _default_:80>
DocumentRoot "D:/Redmine-BITNAMI/apache2/htdocs"
<Directory "D:/Redmine-BITNAMI/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>