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/ruby | |
# | |
# I recommend using Pocket to do the export. It works better than the browser extensions. | |
require 'rubygems' | |
require 'htmlentities' | |
require 'csv' | |
# CHANGE THIS | |
input_file = '/path/to/passwords.csv' |
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
// Converts an ArrayBuffer directly to base64, without any intermediate 'convert to string then | |
// use window.btoa' step. According to my tests, this appears to be a faster approach: | |
// http://jsperf.com/encoding-xhr-image-data/5 | |
/* | |
MIT LICENSE | |
Copyright 2011 Jon Leighton | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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 strict"; | |
// `f` is assumed to sporadically fail with `TemporaryNetworkError` instances. | |
// If one of those happens, we want to retry until it doesn't. | |
// If `f` fails with something else, then we should re-throw: we don't know how to handle that, and it's a | |
// sign something went wrong. Since `f` is a good promise-returning function, it only ever fulfills or rejects; | |
// it has no synchronous behavior (e.g. throwing). | |
function dontGiveUp(f) { | |
return f().then( | |
undefined, // pass through success |
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
/* x is the <input/> element | |
type is the type you want to change it to. | |
jQuery is required and assumed to be the "$" variable */ | |
function changeType(x, type) { | |
if(x.prop('type') == type) | |
return x; //That was easy. | |
try { | |
return x.prop('type', type); //Stupid IE security will not allow this | |
} catch(e) { | |
//Try re-creating the element (yep... this sucks) |
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
[findRegularExpression "[ÀàÁáÂâÃãÄäÅåĀāĂ㥹ǞǟǺǻ]", <name>, "a"] | |
[findRegularExpression "[ÆæǼǽ]", <name>, "ae"] | |
[findRegularExpression "[Ḃḃ]", <name>, "b"] | |
[findRegularExpression "[ĆćÇçČčĈĉĊċ]", <name>, "c"] | |
[findRegularExpression "[ḐḑĎďḊḋĐđÐðDZdzDŽdž]", <name>, "d"] | |
[findRegularExpression "[ÈèÉéĚěÊêËëĒēĔĕĘęĖėƷʒǮǯ]", <name>, "e"] | |
[findRegularExpression "[Ḟḟƒfffiflffifflſt]", <name>, "f"] | |
[findRegularExpression "[ǴǵĢģǦǧĜĝĞğĠġǤǥ]", <name>, "g"] | |
[findRegularExpression "[ĤĥĦħ]", <name>, "h"] | |
[findRegularExpression "[ÌìÍíÎîĨĩÏïĪīĬĭĮįİıIJij]", <name>, "i"] |
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
// Copyright (c) 2015, Brad Conte (http://bradconte.com) | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are met: | |
// * Redistributions of source code must retain the above copyright | |
// notice, this list of conditions and the following disclaimer. | |
// * Redistributions in binary form must reproduce the above copyright | |
// notice, this list of conditions and the following disclaimer in the | |
// documentation and/or other materials provided with the distribution. |
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
<?php | |
// ADD NEW ADMIN USER TO WORDPRESS | |
// ---------------------------------- | |
// Put this file in your Wordpress root directory and run it from your browser. | |
// Delete it when you're done. | |
require_once('wp-blog-header.php'); | |
require_once('wp-includes/registration.php'); | |
// ---------------------------------------------------- |
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
#!/bin/sh | |
parse_yaml() { | |
local prefix=$2 | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | | |
awk -F$fs '{ | |
indent = length($1)/2; | |
vname[indent] = $2; | |
for (i in vname) {if (i > indent) {delete vname[i]}} |
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
@Component | |
@Profile("untrusted") | |
public class SelfSignedTrustCertConfigurer { | |
private final static Logger logger = LoggerFactory.getLogger(SelfSignedTrustCertConfigurer.class.getName()); | |
@PostConstruct | |
public void allowUntrustedCerts() { | |
HostnameVerifier hv = new HostnameVerifier() { | |
public boolean verify(String urlHostName, SSLSession session) { |
OlderNewer