Replace username
with the actual user
- Find the username users
Example:
users
import argparse | |
import json | |
import sqlite3 | |
import os | |
import hashlib | |
def map_keys(obj): | |
# Map 'date' and 'method' keys to 'the_date' and 'the_method' | |
if 'date' in obj: | |
obj['the_date'] = obj.pop('date') |
# 20160728 | |
# [email protected] | |
# | |
# Short script to force AD Azure sync | |
# | |
# https://azure.microsoft.com/en-us/documentation/articles/active-directory-aadconnectsync-feature-scheduler/ | |
# | |
# See latest at https://gist.github.com/jmaddington/987c3e52989ed3cad598b537abf0cb15 | |
Import-Module ADSync |
/**** File icons ****/ | |
$fileIconWidth: 32px; | |
$fileIconHeight: 32px; | |
.fileIcon { | |
display: inline-block; | |
height: $fileIconHeight; | |
width: $fileIconWidth; | |
background: url(images/fileIcons.png) center no-repeat; | |
/*Row 1 */ |
#Change lines 6 & 10 to where you want to store your backups | |
echo 'show databases;'|/usr/bin/mysql --skip-column-names|while read -r db | |
do | |
fn=`date +%Y%m%d%H%S` | |
nice /usr/bin/mysqldump $db| bzip2 -9 > /root/backups/mysql/hourly/$fn.$db.sql.bz2 | |
done | |
#Change +3 to however many days you want to keep backups | |
find /root/backups/mysql/hourly/ -ctime +3 -exec rm "{}" \; |
/* | |
Autosorting function for jQuery datatables. Looks for a table with the classes datatable and autosort | |
If it finds thead>tr>th[data-autosort] and then sorts the table by that TH's index in the direction indicated | |
by the data-sortdir attribute. | |
@author JM Addington <[email protected]> | |
*/ | |
function autosort() { | |
$('.datatable.autosort').each(function() { | |
var n = 0; |
/*Keeps columns equal height*/ | |
//Modified from http://www.cssnewbie.com/equal-height-columns-with-jquery/#.UtX2EJ5dXTc | |
function equalHeight(group) { | |
group.each(function(){ | |
$(this).css('height', 'auto'); | |
}) | |
if ($(document).width() > 600) { | |
var tallest = 0; |
<option value="AL" [[If? &subject=`[[+value]]` &operand=`AL` &then=`SELECTED`]]>Alabama</option> | |
<option value="AK" [[If? &subject=`[[+value]]` &operand=`AK` &then=`SELECTED`]]>Alaska</option> | |
<option value="AZ" [[If? &subject=`[[+value]]` &operand=`AZ` &then=`SELECTED`]]>Arizona</option> | |
<option value="AR" [[If? &subject=`[[+value]]` &operand=`AR` &then=`SELECTED`]]>Arkansas</option> | |
<option value="CA" [[If? &subject=`[[+value]]` &operand=`CA` &then=`SELECTED`]]>California</option> | |
<option value="CO" [[If? &subject=`[[+value]]` &operand=`CO` &then=`SELECTED`]]>Colorado</option> | |
<option value="CT" [[If? &subject=`[[+value]]` &operand=`CT` &then=`SELECTED`]]>Connecticut</option> | |
<option value="DE" [[If? &subject=`[[+value]]` &operand=`DE` &then=`SELECTED`]]>Delaware</option> | |
<option value="DC" [[If? &subject=`[[+value]]` &operand=`DC` &then=`SELECTED`]]>District of Columbia</option> | |
<option value="FL" [[If? &subject=`[[+value]]` &operand=`FL` &then=`SELECTED`]]>Florida</option> |
<?php | |
/** | |
* jsonToPlaceholders snippet for JM Customer Database extra | |
* | |
* Copyright 2013 by JM Addington [email protected] | |
* Created on 04-28-2013 | |
* | |
* @package jmc | |
*/ |
Alabama==AL||Alaska==AK||Arizona==AZ||Arkansas==AR||California==CA||Colorado==CO||Connecticut==CT||Delaware==DE||District of Columbia==DC||Florida==FL||Georgia==GA||Hawaii==HI||Idaho==ID||Illinois==IL||Indiana==IN||Iowa==IA||Kansas==KS||Kentucky==KY||Louisiana==LA||Maine==ME||Montana==MT||Nebraska==NE||Nevada==NV||New Hampshire==NH||New Jersey==NJ||New Mexico==NM||New York==NY||North Carolina==NC||North Dakota==ND||Ohio==OH||Oklahoma==OK||Oregon==OR||Maryland==MD||Massachusetts==MA||Michigan==MI||Minnesota==MN||Mississippi==MS||Missouri==MO||Pennsylvania==PA||Rhode Island==RI||South Carolina==SC||South Dakota==SD||Tennessee==TN||Texas==TX||Utah==UT||Vermont==VT||Virginia==VA||Washington==WA||West Virginia==WV||Wisconsin==WI||Wyoming==WY |