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/bash | |
# print base64 UUIDs on command line as LDAP search filter of the form: | |
# (|(ObjectGuid=\xx\xx\xx\xx\xx\xx\xx\xx\xx\xx\xx\xx\xx\xx\xx\xx)...) | |
fn_base64_uuid_to_hexarray() { | |
# hexdump base64 valie in $2 to a new indexed array of hex values and name the array $1 | |
# declare global array, not assigning a value for 2 reasons: | |
# - command substitution exit code would be discarded | |
# - declaring arrays with variable name require quoting the right side: $n='(1 2 3)' |
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/bash | |
# | |
# delete *.Required* marker files belonging to a Mendix module and delete their | |
# *.jar files unused by other modules | |
# | |
# Usage: | |
# cd userlib | |
# # delete module: | |
# mxmoduleclean MODULE | |
# # delete everything except MODULE |
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/bash | |
# usage: | |
# socat TCP-LISTEN:3128,reuseaddr,fork EXEC:"./hugebuf.sh -p",nofork | |
set -e | |
proxymode= | |
case $1 in |
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
package org.foo.chainedlist; | |
import java.util.AbstractList; | |
import java.util.Arrays; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.ListIterator; | |
import java.util.RandomAccess; | |
import org.apache.commons.collections4.IterableUtils; |
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
/// disable-pageview-api.js | |
// Based on: https://addons.mozilla.org/firefox/addon/disable-page-visibility/ | |
// License: http://www.opensource.org/licenses/bsd-license.php | |
(function(){ | |
// visibilitychange events are captured and stopped | |
document.addEventListener("visibilitychange", function(e) { | |
e.stopImmediatePropagation(); | |
}, true); | |
// document.visibilityState always returns false | |
Object.defineProperty(Document.prototype, "hidden", { |
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/bash | |
# Check if the current time falls within defined time range on UNIX | |
#set -e | |
set -o pipefail | |
function errtrap { es=$?; echo "ERROR line $1: Command exited with status $es.">&2; exit 1; }; trap 'errtrap $LINENO' ERR | |
#export TZ=Asia/Kolkata |
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
package org.foo.modulegen; | |
import java.io.BufferedInputStream; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.net.MalformedURLException; | |
import java.net.URI; | |
import java.net.URISyntaxException; | |
import java.net.URL; |
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
package org.foo.testproxy; | |
import java.beans.BeanInfo; | |
import java.beans.Introspector; | |
import java.beans.PropertyDescriptor; | |
import java.lang.reflect.Method; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Objects; |
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
public class EclipseExtractConstant { | |
private static final int _42 = 42; | |
private static final String STRING€WITH_SPECIAL_CHARACTERS = "string€with%special†characters/\\!"; | |
private static final String _100STRINGSSTARTSWITHNUMBER = "100stringsstartswithnumber"; | |
private static final String STRING_WITH_SPACES = "string with spaces"; | |
public static void main(final String[] args) { | |
System.out.println(x(STRING€WITH_SPECIAL_CHARACTERS)); | |
System.out.println(x(_100STRINGSSTARTSWITHNUMBER)); |
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
package org.foo.csvtokenizer; | |
import java.io.Reader; | |
import java.io.StreamTokenizer; | |
import java.util.ArrayList; | |
import java.util.List; | |
public abstract class AbstractPushingCsvParser implements PushingCsvParser { | |
@Override |
NewerOlder