Skip to content

Instantly share code, notes, and snippets.

View rdev5's full-sized avatar
💭
Note: This account has been moved to @mattborja

Matt Borja rdev5

💭
Note: This account has been moved to @mattborja
View GitHub Profile
/// <summary>
/// Defines the flags used for setting user properties in the directory.
/// </summary>
/// <remarks>
/// Source: https://msdn.microsoft.com/en-us/library/ms180913(v=vs.80).aspx
/// </remarks>
[SuppressMessage("ReSharper", "InconsistentNaming")]
public static class UserAccountFlags
{
public const int ADS_UF_SCRIPT = 1; // 0x1
/// <summary>
/// Defines the flags used for setting user properties in the directory.
/// </summary>
/// <remarks>
/// Source: https://msdn.microsoft.com/en-us/library/ms180913(v=vs.80).aspx
/// </remarks>
[SuppressMessage("ReSharper", "InconsistentNaming")]
public static class UserAccountFlags
{
public const int ADS_UF_SCRIPT = 1; // 0x1
<div class="container">
<!-- Don't need grid system here... -->
<div class="page-header">
<h1>Request</h1>
</div>
<!-- ...or here -->
<div class="well well-lg">
<strong>Status: Revoked</strong>
</div>
var createForm = function(action, fields) {
function isObject(val) {
if (val === null) { return false;}
return ( (typeof val === 'function') || (typeof val === 'object') );
}
if (!isObject(fields))
return;
// Create form
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<!--
Configuration Summary:
- Use faster kernel-mode caching for static assets (i.e. images, scripts, stylesheets, HTML), only refreshing them if the file itself changes.
- Use user-mode caching (varyByHeaders), expiring after 5 minutes (default cache worthiness: 2 hits within 10s)
-->
<caching enabled="true" enableKernelCache="true">
<profiles>
#!/bin/bash
host="$1"
user="$2"
database="$3"
output="$4"
if [ -z "$host" ] || [ -z "$user" ] || [ -z "$database" ] || [ -z "$output" ]; then
echo "Usage: $0 <host> <user> <database> <outputfile>"
exit
fi
@rdev5
rdev5 / AESGCM.cs
Created May 25, 2016 04:57 — forked from jbtule/AESGCM.cs
I have two code examples that I wrote for best practices encrypting a string in c#. They are both using authenticated encryption. http://stackoverflow.com/a/10366194/637783
/*
* This work (Modern Encryption of a String C#, by James Tuley),
* identified by James Tuley, is free of known copyright restrictions.
* https://gist.github.com/4336842
* http://creativecommons.org/publicdomain/mark/1.0/
*/
using System;
using System.IO;
using System.Text;
440a241dd80fcc5664e861989db716e08ce627d8d40c7ea360ae855c727a49ee
/*
* Usage:
* document.location = 'chrome://history-frame/';
* clearResults('Gmail'); // rinse and repeat
*/
var purgeResults=function(){document.getElementById("remove-selected").disabled=!1;for(var e=document.getElementsByTagName("input"),t=0;t<e.length;++t)"checkbox"==e[t].type&&(e[t].checked=!0);document.getElementById("remove-selected").disabled=!1,document.getElementById("remove-selected").click(),document.getElementById("alertOverlayOk").click()};
var clearResults=function(e){document.getElementById("search-field").value=e,document.getElementById("search-button").click(); setTimeout(function() { purgeResults(); }, 1000);};
@rdev5
rdev5 / 0_reuse_code.js
Created April 15, 2016 15:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console