Skip to content

Instantly share code, notes, and snippets.

@j4yk
j4yk / gist:1a0b5af4a30bd9f3d662dc285090ebcf
Created September 17, 2022 20:08
Db2 select table information
Describe table TABLENAME
# Does not work on aliases.
# See what you can select from syscat.columns
Select COLNAME from syscat.columns where tabname='COLUMNS' and tabschema='SYSCAT'
# Get type of a certain column
Select TABNAME, COLNAME, TYPENAME, LENGTH from syscat.columns where (tabschema,tabname,colname)=('$SCHEMA', '$TABLE', '$COLUMN')
@j4yk
j4yk / openTextInWorkspace.st
Created April 24, 2017 15:45
Open a Text or String object in a Workspace in Squeak
StringHolder new openLabel: 'Text'; contents: aStringOrText; changed: #contents
@j4yk
j4yk / grabObject.st
Created March 16, 2017 17:05
DoIt to grab (drag and drop) arbitrary objects in Squeak/Morphic
ActiveHand grabMorph: (TransferMorph withPassenger: anObject)
@j4yk
j4yk / reinitThisOSProcess.st
Created November 10, 2015 21:50
Reinitialize ThisOSProcess on Windows, when thisOSProcess returns nil
AttachableFileStream initialize.
OSProcessAccessor initialize.
OSProcess initialize.
ThisOSProcess initializeThisOSProcess
WindowsProcess initialize.
self assert: OSProcess thisOSProcess notNil
@j4yk
j4yk / X sel to clipboard
Created January 14, 2015 13:24
copy X selection to clipboard
xclip -o | xclip -i -selection CLIPBOARD
@j4yk
j4yk / .vimrc
Last active December 30, 2015 21:59
my .vimrc
filetype plugin indent on
set encoding=utf8
set guifont:Consolas:h11:cANSI
set ruler
set backspace=start,indent,eol
set smartindent
set tabstop=4
set shiftwidth=4
set colorcolumn=80
syntax on