$ psql -h localhost -p 1000 -U yorkie databasename
> input password
Further reading:
$ psql -h localhost -p 1000 -U yorkie databasename
> input password
Further reading:
var dgram = require('dgram'); | |
var assert = require('assert'); | |
var args = process.argv.slice(2); | |
var port = parseInt(args[0]); | |
assert.ok(typeof port === 'number'); | |
var dc = dgram.createSocket('udp4'); | |
dc.on('error', function(err) { |
::-webkit-scrollbar { | |
height: 15px; | |
width: 15px; | |
} | |
::-webkit-scrollbar-button { | |
height: 0; | |
width: 0; | |
} | |
::-webkit-scrollbar-thumb { | |
background-clip: padding-box; |
::-webkit-input-placeholder { | |
text-align:center; | |
} | |
:-moz-placeholder { /* Firefox 18- */ | |
text-align:center; | |
} | |
::-moz-placeholder { /* Firefox 19+ */ | |
text-align:center; |
var url = require('url'); | |
var assert = require('assert'); | |
function parse(repo, githubHost) { | |
githubHost = githubHost || 'github.com' | |
if (typeof repo === 'object') | |
return repo.url | |
var repoObj = url.parse(repo); |
var request = require('request'); | |
var idlehands = require('idle-hands'); | |
var timerCount = 0; | |
var idleCount = 0; | |
function repeat(cb) { | |
setImmediate(function() { | |
timerCount += 1; | |
}); |
var sinon = require('sinon'); | |
var clock = sinon.useFakeTimer(); | |
setTimeout(function timer() { | |
console.log('...') | |
}, 1000); | |
// if we set: | |
clock.tick(1000); // timer will be called |
update yum config via vi:
$ vi /etc/yum.repos.d/DevToolset.repo
make sure this file is new and paste below block to your terminal:
[DevToolset-2]
name=RedHat DevToolset v2 $releasever - $basearch
import os | |
from ctypes.util import find_library | |
from ctypes import CDLL, cast, c_char_p, c_int, c_size_t, c_void_p | |
_libcfile = find_library('c') or 'libc.so.6' | |
libc = CDLL(_libcfile, use_errno=True) | |
_libopenccfile = os.environ.get('LIBOPENCC') or find_library('opencc') |
### command-line | |
git log posts/example.js | awk '/Date/ { print $2, $3, $4, $5, $6; exit; }' | |
### in script | |
date = `git log posts/example.js | awk '/Date/ { \ | |
print $2, $3, $4, $5, $6; \ | |
exit; \ | |
}'` |