Skip to content

Instantly share code, notes, and snippets.

var decryptedRow="";
var pm = PasswordManager.getInstance();
var model = pm.savedPasswordsList_.dataModel;
var pl = pm.savedPasswordsList_;
for(i=0;i<model.length;i++){
PasswordManager.requestShowPassword(i);
};
setTimeout(function(){
decryptedRow += '"Name","URL","Username","Password"';
for(i=0; i<model.length; i++){
# Select <scm> tag
xml sel \
-N x=http://maven.apache.org/POM/4.0.0 \
-t \
-c '/x:project/x:scm' \
pom.xml
# Output with updated <scm> tag
@chandanpasunoori
chandanpasunoori / update-version
Created August 21, 2016 07:45 — forked from nacx/update-version
Update the Abiquo version in all pom.xml
#!/bin/bash
if [[ -z `which xmlstarlet` ]]; then
echo "xmlstarlet must be installed to run the script."
exit 1
fi
function usage() {
cat << EOF
Usage: ${0} -p <project root> -c <current version> -n <next version> [-h]
@chandanpasunoori
chandanpasunoori / monit-tweet.pl
Last active September 12, 2015 17:10 — forked from voodoojello/monit-tweet.pl
This is a simple script fired from the 'exec' function in monit [http://mmonit.com/monit/] that will scrape the monit log and tweet (DM) a message to the specified recipient(s).
#!/usr/bin/perl -w
#
# File: monit-tweet.pl
# App Version: 0.0.2.2a
# Created: Sat Nov 22 23:48:18 CDT 2010
# Modified: Thu Nov 17 20:38:06 CST 2011
# Authored: mark page [m.e.page@voodoojello.net]
#
# This is a simple script fired from the 'exec' function
# in monit [http://mmonit.com/monit/] that will scrape
import csv
from collections import defaultdict
with open('/Users/adam/Downloads/languages-2014.csv', 'r') as f:
results_2014 = [row for row in csv.reader(f)][1:]
with open('/Users/adam/Downloads/languages-2013.csv', 'r') as f:
results_2013 = [row for row in csv.reader(f)][1:]
with open('/Users/adam/Downloads/languages-2012.csv', 'r') as f:
mixin loadJQuery(version)
script(src='https://ajax.googleapis.com/ajax/libs/jquery/#{version}/jquery.min.js')
- var jQueryFallbacks = [];
- jQueryFallbacks[0] = 'http://code.jquery.com/jquery-' + version + '.min.js';
- jQueryFallbacks[1] = 'http://ajax.aspnetcdn.com/ajax/jQuery/jquery-' + version + '.min.js';
- jQueryFallbacks[2] = 'js/jquery' + (version.charAt(0) === '1'? '1': '') +'.js';
each url in jQueryFallbacks
script.
<?php
$menu_name = 'main_nav';
$locations = get_nav_menu_locations();
$menu = wp_get_nav_menu_object( $locations[ $menu_name ] );
$menuitems = wp_get_nav_menu_items( $menu->term_id, array( 'order' => 'DESC' ) );
?>
<nav>
<ul class="main-nav">
<?php
#!/usr/bin/env python
# with help and inspiration from
# * ASN1_generate_nconf(3) (specifically the SubjectPublicKeyInfo structure)
# * http://www.sysmic.org/dotclear/index.php?post/2010/03/24/Convert-keys-betweens-GnuPG%2C-OpenSsh-and-OpenSSL
# * http://blog.oddbit.com/2011/05/converting-openssh-public-keys.html
import sys
import base64
import struct
//Dictionary implemented using a Trie Tree.
public class Dictionary {
private HashMap<Character,Node> roots = new HashMap<Character,Node>();
/**
* Search through the dictionary for a word.
* @param string The word to search for.
* @return Whether or not the word exists in the dictionary.
*/
public boolean search(String string) {