Skip to content

Instantly share code, notes, and snippets.

lucas1

Block or report user

Report or block lucas1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lucas1
lucas1 / psqlfix.txt
Created Apr 28, 2016 — forked from ffmike/psqlfix.txt
Change postgres default template0 to UTF8 encoding
View psqlfix.txt
mike@rbci:~$ psql -U postgres
psql (9.0.3)
Type "help" for help.
postgres=# update pg_database set datallowconn = TRUE where datname = 'template0';
UPDATE 1
postgres=# \c template0
You are now connected to database "template0".
template0=# update pg_database set datistemplate = FALSE where datname = 'template1';
UPDATE 1
@lucas1
lucas1 / vim74centos
Created Nov 2, 2016 — forked from juxtin/vim74centos
Compile Vim 7.4 on Centos and install my vimrc
View vim74centos
#!/bin/bash
yum groupinstall 'Development tools' -y
yum install ncurses ncurses-devel wget git -y
cd /usr/local/src
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
tar -xjf vim-7.4.tar.bz2
cd vim74
./configure --prefix=/usr --with-features=huge --enable-rubyinterp --enable-pythoninterp
make && make install
@lucas1
lucas1 / README.md
Created Sep 7, 2019 — forked from pbojinov/README.md
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/
View README.md

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

You can’t perform that action at this time.