Skip to content

Instantly share code, notes, and snippets.

View yn's full-sized avatar

Yuri Niyazov yn

View GitHub Profile
SELECT nspname || '.' || relname AS "relation",
pg_size_pretty(pg_relation_size(C.oid)) AS "size"
FROM pg_class C
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
WHERE nspname NOT IN ('pg_catalog', 'information_schema')
ORDER BY pg_relation_size(C.oid) DESC
LIMIT 1;
relation | size
---------------------------+--------
pg_toast.pg_toast_1290405 | 241 GB
ansible-playbook --user=ubuntu --connection=ssh --limit='p2' --inventory-file=/Users/yn/code/mine/provisioner/.vagrant/provisioners/ansible/inventory -vvvv -e pipelining=False playbook.yml
PLAY [all] ********************************************************************
GATHERING FACTS ***************************************************************
<52.13.91.160> ESTABLISH CONNECTION FOR USER: ubuntu
<52.13.91.160> REMOTE_MODULE setup
<52.13.91.160> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/Users/yn/.ansible/cp/ansible-ssh-%h-%p-%r" -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 52.13.91.160 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1436994685.63-226544852682902 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1436994685.63-226544852682902 && echo $HOME/.ansible/tmp/ansible-tmp-1436994685.63-226544852682902'
<52.13.91.160
∴ ansible-playbook --user=ubuntu --connection=ssh --limit='p2' --inventory-file=/Users/yn/code/mine/provisioner/.vagrant/provisioners/ansible/inventory -vvvv -e pipelining=True test.yml
PLAY [all] ********************************************************************
GATHERING FACTS ***************************************************************
<52.13.91.160> ESTABLISH CONNECTION FOR USER: ubuntu
<52.13.91.160> REMOTE_MODULE setup
<52.13.91.160> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/Users/yn/.ansible/cp/ansible-ssh-%h-%p-%r" -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 52.13.91.160 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1436991610.26-78009081013282 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1436991610.26-78009081013282 && echo $HOME/.ansible/tmp/ansible-tmp-1436991610.26-78009081013282'
<52.13.91.160> PUT /v
“Apple Computers is a famous example: it was founded by (mostly Republican) computer engineers who broke from IBM in Silicon Valley in the 1980s, forming little democratic circles of twenty to forty people with their laptops in each other’s garages.”
Excerpt From: David Graeber. “Debt.” iBooks. https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewBook?id=284D6357CB75603FE3BBA077A41A79F0
@yn
yn / gist:8110031
Created December 24, 2013 07:43
Java Swig compilation error
[burry:~/code/mine/mosaic master ruby-2.0.0-p353]
∴ cmake -DCMAKE_BUILD_TYPE=Debug -H. -Bbuild/debug
-- The C compiler identification is Clang 5.0.0
-- The CXX compiler identification is Clang 5.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
@yn
yn / gist:8093243
Created December 23, 2013 07:58
Compilation errors
[burry:~/code/mine/mosaic master ruby-2.0.0-p353]
∴ cmake -DCMAKE_BUILD_TYPE=Debug -H. -Bbuild/debug
-- The C compiler identification is Clang 5.0.0
-- The CXX compiler identification is Clang 5.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
01:41:26,472 INFO [EReader ] ib.api: historicalData request-id 322
01:41:26,531 INFO [nREPL-worker-0 ] secmaster.schema: offset 0 limit 100000
01:41:26,554 INFO [nREPL-worker-0 ] ib.api: request-historical-data {:request-id 323, :params {:method :reqHistoricalData, :contract #<Contract com.ib.client.Contract@29c5ef5e>, :contract-map {:symbol CSCO, :secType STK, :exchange SMART, :currency USD, :comboLegs #<Vector []>}, :end-date-time 20131206 13:00:00, :duration 5 D, :bar-size 1 day, :what-to-show TRADES, :use-rth 1, :format-date 1}, :channel #<ManyToManyChannel clojure.core.async.impl.channels.ManyToManyChannel@1e619bf>}
01:41:26,556 INFO [Thread-8 ] ib.throttler: looking back at request time 01:30:12,263
01:41:26,556 INFO [Thread-8 ] ib.throttler: created request with time 01:41:26,555
01:41:26,570 INFO [Thread-8 ] ib.throttler:
{:request-id 323,
:params
{:method :reqHistoricalData,
:contract #<Contract com.ib.client.Contract@29c5ef5e>,
@yn
yn / rvm_debug.txt
Created May 2, 2011 18:03
rvm bug report - I have a shell-aliased "rm" function that renames and moves files into Trash. unaliasing it makes everything work. It would help if rvm used \rm \mv and \cp everywhere
ruby-1.8.7-p330:
rvm 1.6.5 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]
ruby-1.8.7-p330:
system:
checking whether OS depend dynamic link works... In file included from /usr/local/include/fuse/fuse.h:26,
from <command-line>:0:
/usr/local/include/fuse/fuse_common.h:32:2: error: #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags!
In file included from /usr/local/include/fuse/fuse.h:857,
from <command-line>:0:
/usr/local/include/fuse/fuse_compat.h:69:24: error: sys/statfs.h: No such file or directory
file = File.open("ordinal")
while file.gets
print if /third/ .. /fifth/
end