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 | |
/** | |
* Bukkit Build RSS Generator | |
* | |
* @version 0.3 | |
* @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License | |
*/ | |
/* Channel configuration */ |
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 | |
$params = array('users', 'JWhy', 'repositories'); | |
$n_params = sizeof($params); | |
switch($n_params){ | |
case 0: | |
die('Not enough information supplied'); | |
break; | |
case 1: | |
$params[1] = ''; |
I hereby claim:
- I am jwhb on github.
- I am jwhy (https://keybase.io/jwhy) on keybase.
- I have a public key whose fingerprint is 0A90 2DEE 61AD 62B8 6970 5333 8300 84A3 9E8E 3A97
To claim this, I am signing this object:
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
# The following asadmin command creates a JDBC Security Realm. It was created with a Derby database in mind, thus all table and column names are in uppercase. For non-Derby databases you might need to respect the actual cases. | |
asadmin create-auth-realm --classname com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm --property user-name-column=USERNAME:password-column=PASSWORD:digestrealm-password-enc-algorithm=none:group-name-column=GROUPNAME:group-table=USERS_GROUPS:user-table=USERS:datasource-jndi=jdbc/myapp-ds:jaas-context=jdbcRealm:db-user=admin:db-password=admin:digest-algorithm=none:group-table-user-name-column=USERNAME jdbcRealm |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("online.tipp10.com") { | |
#training, .lightsel0 { | |
background-color: #002b36; | |
} | |
#ticker, #status { | |
background-color: #073642; | |
} | |
#fingers { |
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
// manipulate octets of IP address with Javascript regular expressions | |
var regex = /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.)(\d{1,3})(\/[1-3]?\d)$/; | |
var ip = '169.254.0.17/30'; | |
var octet4 = ip.match(regex)[2] - 1; // match and manipulate octet | |
var ip2 = ip.replace(regex, '$1' + octet4 + '$3'); // reassemble IP | |
console.log(ip2); //169.254.0.16/30 |
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 | |
# start ansible container with working directory mounted as /ansible | |
# then run ping on targets from inventory file | |
docker run --rm -v $(pwd):/ansible -it webdevops/ansible:alpine ansible -m ping -i /ansible/inventory all |
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 | |
if [ ! "$#" -eq "2" ]; then | |
echo "Usage: $0 <path> <search_text>" | |
exit 1 | |
fi | |
find "$1" -name '*.pdf' -exec sh -c "pdftotext -q '{}' - | grep --with-filename --label='{}' --color -i '$2'" \; |
OlderNewer