jq is useful to slice, filter, map and transform structured json data.
brew install jq
<div> | |
<pre> | |
<#list portletPreferences?keys as preference> | |
<#if portletPreferences[preference] ??> | |
<#assign mapValues = portletPreferences[preference] /> | |
<#list mapValues as value > | |
${preference} = ${value}<br /> | |
</#list> | |
</#if> | |
</#list> |
export TERM="xterm-256color" # This sets up colors properly | |
# workaround as per https://superuser.com/questions/1222867/zsh-completion-functions-broken | |
FPATH=$HOME/.oh-my-zsh/plugins/git:$HOME/.oh-my-zsh/functions:$HOME/.oh-my-zsh/completions:/usr/share/zsh/site-functions:/usr/share/zsh/$ZSH_VERSION/functions | |
export FPATH | |
# set shell | |
export SHELL=/usr/bin/zsh |
#!/usr/bin/env python | |
# Kawin Viriyaprasopsook<[email protected]> | |
# 2023-10-19 | |
# sudo apt-get -y install pcscd python-pyscard python-pil | |
import binascii | |
import os | |
import sys | |
from PIL import Image | |
from smartcard.System import readers |
<AuthnProviderAlias ldap auth1> | |
AuthLDAPURL "ldaps://auth1.example.com:636/DC=example,DC=com?sAMAccountName?sub?(objectClass=*)" | |
AuthLDAPBindDN "ldap_query" | |
AuthLDAPBindPassword "password" | |
</AuthnProviderAlias> | |
<AuthnProviderAlias ldap auth2> | |
AuthLDAPURL "ldaps://auth2.example.com:636/DC=example,DC=com?sAMAccountName?sub?(objectClass=*)" | |
AuthLDAPBindDN "ldap_query" | |
AuthLDAPBindPassword "password" |
import com.eviware.soapui.support.types.StringToStringsMap | |
def authSucceeded = false | |
// Add those custom properties to your mock server | |
def user = mockRunner.mockService.getPropertyValue("httpUsername") | |
def pass = mockRunner.mockService.getPropertyValue("httpPassword") | |
log.info "checking for credentials: $user:$pass" | |
// get the request headers | |
StringToStringsMap headers = mockRequest.getRequestHeaders() |
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |
import java.sql.Connection; | |
import java.sql.ResultSet; | |
import java.sql.ResultSetMetaData; | |
import java.sql.SQLException; | |
import java.sql.Statement; | |
import com.liferay.portal.kernel.dao.jdbc.DataAccess; | |
Connection con = null; | |
Statement st = null; |
#!/bin/bash | |
BUILDDIR=/tmp/php_imap_mavericks | |
mkdir "$BUILDDIR" | |
echo " " | |
echo "= FETCHING AND INSTALLING IMAP" | |
echo " " | |
cd "$BUILDDIR" | |
wget -c ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz | |
rm -rf imap-2007f |