Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
output_dir=./${output_dir}
rm -v -rf $output_dir
mkdir -v $output_dir
suffix='-print'; suffix_cohe='-cohe'
ls ./A*${suffix}.pdf >/dev/null 2>&1 || { suffix=''; suffix_cohe=''; }
pdffile="A1-1${suffix}.pdf"
DBMS_REDACT.ADD_POLICY
(policy_name => 'EMPSAL_POLICY',
object_schema => 'HR',
object_name => 'EMP',
column_name => 'SALARY',
expression => 'SYS_CONTEXT(''USERENV'', ''SESSION_USER'') != ''HR-VP'');
@yoshikaw
yoshikaw / gist:73b841d173664a9957f0
Created October 18, 2014 08:51
mlterm configure error on OS X Yosemite (10.10)
cached) (cached) checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for connect in -lsocket... no
checking for X... no
** ERROR **
Could not find xlib.
./configure CFLAGS=-I/opt/X11/include/freetype2 --with-type-engines=cairo 1.43s user 1.75s system 106% cpu 2.998 total
--- a/src/extern.h 2014-04-13 23:57:49.000000000 +0900
+++ b/src/extern.h 2014-04-14 00:02:14.000000000 +0900
@@ -211,6 +211,7 @@
extern void DoScreen __P((char *, char **));
extern int IsNumColon __P((char *, int, char *, int));
extern void ShowWindows __P((int));
+extern void ShowWindowsX __P((char *));
extern char *AddWindows __P((char *, int, int, int));
extern char *AddWindowFlags __P((char *, int, struct win *));
extern char *AddOtherUsers __P((char *, int, struct win *));
export CFLAGS='-I/usr/local/lib/glib-2.0/include -I/usr/local/include/glib-2.0 -I/usr/local/include/gtk-3.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/cairo -I/usr/local/include/gdk-pixbuf-2.0'
./configure --prefix=$HOME/local/stow/${PWD##*/}.$(date +%Y%m%d) --enable-image
make clean all
gcc -I../.. -I../.. -I. -I/usr/local/lib/glib-2.0/include -I/usr/local/include/glib-2.0 -I/usr/local/include/gtk-3.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/cairo -I/usr/local/include/gdk-pixbuf-2.0 -I./libwc -DHAVE_CONFIG_H -c x11_w3mimg.c
x11_w3mimg.c:18:10: fatal error: 'gdk-pixbuf-xlib/gdk-pixbuf-xlib.h' file not found
#include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
^
% ./autogen.sh
_screen_set_cmd_title:8: bad floating point constant
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
configure.ac:39: error: must install xorg-macros 1.14 or later before running autoconf/autogen
configure.ac:39: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1
autoreconf: aclocal failed with exit status: 1
diff --git a/scripts/spdf b/scripts/spdf
index 45deb82..bd73b41 100755
--- a/scripts/spdf
+++ b/scripts/spdf
@@ -6,7 +6,7 @@ INDEX=1
function mktemp_file()
{
- FILENAME=`mktemp --tmpdir=/tmp spdf.XXXXXX`
+ FILENAME=$(mktemp ${TMP:=${TEMP:=${TMPDIR:=$HOME}}}/spdf.XXXXXX)
#!/bin/bash
#
(
echo "conn scott/tiger"
echo "set timi off time off sqlp \"\" feed off lines 9999 trims on tab off"
echo "set numformat 999999999999999999999999999999"
while :
do
t=$(date +'%DT%T')
echo "SELECT '${t:0:8}' as logged_date, '${t:9}' as logged_time,db_time,db_cpu,bg_time,bg_cpu FROM (SELECT stat_name,value FROM v\$sys
@yoshikaw
yoshikaw / gist:0f67decd38ec2b6067d0
Created August 14, 2014 10:26
Jail環境の作り方
# cd ~/j2
# fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/10.0-RELEASE/base.txz
# tar xpf base.txz -C .
# rm base.txz
# ls
# jail -c path=~/j2 mount.devfs host.hostname=jail.example.co.jp ip4.addr=192.168.1.123 command=/bin/sh
function <SNR>1_unite_exec..<SNR>66_call_unite_empty..unite#start..unite#start#standard..unite#candidates#_recache..<SNR>105_recache_candidates_loop..<SNR>105_get_source_candidates..332..333..unite#util#read_lines..<SNR>147_read_lines..<SNR>147_read_pipes..<SNR>147_read..<SNR>147_vp_pipe_read..<SNR>147_libcall_raw_read, 行 12
vimproc: vp_pipe_read: '2F686F6D652F796F7368696B6177612E6B617A756869726F2F776F726B2F54393931385F74656D702F6C6F672E706F727465722F74656D7075736167652E6C6F672E32303134303830393A383338313A2020202020203120202020202020202038383820544D202020202020202020202020202054454D502020202020202020202020206D74713220202020202020317471347836796A736779746B2053454C454354202F2A202F686F6D652F777777726F6F742F6D656D6265722F636F6D6D6F6E2F6D72636E5F6765745F73696D706C655F656E7472795F7265636F6D6D656E642E63666D202A2F20202020434F554E542844495354494E43540D0A<ff>1<ff>'
[unite.vim] Error occured in gather_candidates!
[unite.vim] Source name is grep