This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data_warehouse=# \ddp | |
Default access privileges | |
Owner | Schema | Type | Access privileges | |
--------+--------+-------+------------------- | |
mikela | rails | table | django=r/mikela | |
(1 row) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION remove_words(message text) RETURNS SETOF text AS $$ | |
BEGIN | |
RETURN QUERY select * from regexp_split_to_table(message, E'\\s+') except select boring_words.word from boring_words where boring_words.word = ANY(regexp_split_to_array(message, E'\\s+')); | |
END; | |
$$ LANGUAGE plpgsql; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-rw-r--r-- 1 root root 29M Aug 1 18:21 initrd.img-3.16.0-4-amd64.old-dkms | |
-rw-r--r-- 1 root root 32M Nov 21 10:47 initrd.img-4.9.0-0.bpo.2-amd64.old-dkms | |
-rw-r--r-- 1 root root 32M Nov 21 10:29 initrd.img-4.9.0-0.bpo.3-amd64.old-dkms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_ansible_parsed": true, | |
"_ansible_no_log": false, | |
"changed": false, | |
"failed": true, | |
"invocation": { | |
"module_args": "" | |
}, | |
"msg": "Could not get output from /usr/bin/python3.6 -m venv --help: Traceback (most recent call last):\n File \"/usr/lib/python3.6/runpy.py\", line 183, in _run_module_as_main\n mod_name, mod_spec, code = _get_module_details(mod_name, _Error)\n File \"/usr/lib/python3.6/runpy.py\", line 142, in _get_module_details\n return _get_module_details(pkg_main_name, error)\n File \"/usr/lib/python3.6/runpy.py\", line 109, in _get_module_details\n __import__(pkg_name)\n File \"/usr/lib/python3.6/venv/__init__.py\", line 7, in <module>\n import logging\n File \"/usr/lib/python3.6/logging/__init__.py\", line 26, in <module>\n import sys, os, time, io, traceback, warnings, weakref, collections\n File \"/usr/lib/python3.6/traceback.py\", line 5, in <module>\n import linecache\n File \"/usr/lib/python3.6/linecache.py\", line 11, in <module>\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The full traceback is: | |
Traceback (most recent call last): | |
File "/tmp/ansible_Pa6gvA/ansible_module_postgresql_user.py", line 780, in <module> | |
main() | |
File "/tmp/ansible_Pa6gvA/ansible_module_postgresql_user.py", line 733, in main | |
changed = user_alter(cursor, module, user, password, role_attr_flags, encrypted, expires, no_password_changes) | |
File "/tmp/ansible_Pa6gvA/ansible_module_postgresql_user.py", line 288, in user_alter | |
cursor.execute(select, {"user": user}) | |
File "/home/mikela/.conda/envs/playbooks/lib/python2.7/site-packages/psycopg2/extras.py", line 144, in execute | |
return super(DictCursor, self).execute(query, vars) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: no | |
vars: | |
region: us-west-2 | |
prefix: staging | |
az: us-west-2c | |
tasks: | |
- name: create vpc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import create_engine | |
columns = ['flame_retardants',] | |
engine = create_engine('postgresql:///your_user') | |
def make_sql(column): | |
#x21 = 'update tedx set %s=1 where %s="X"' % (column, column) | |
#null20 = 'update tedx set %s=0 where %s is null"' % (column, column) | |
sql = "alter table tedx alter %s type bool using case when %s='X' then TRUE else FALSE END;" % (column, column) | |
engine.execute(sql) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Welcome to the thoughtbot laptop script! | |
# Be prepared to turn your laptop (or desktop, no haters here) | |
# into an awesome development machine. | |
fancy_echo() { | |
local fmt="$1"; shift | |
# shellcheck disable=SC2059 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
'test': 'test' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
not ok 1 TypeError: __coverageWrap(...)(...) is undefined | |
--- | |
operator: error | |
expected: | |
undefined | |
actual: | |
{ columnNumber: 4, fileName: 'http://localhost:50431/__testling?show=true', lineNumber: 7726 } | |
stack: | |
[15]</<@http://localhost:50431/__testling?show=true:7726 | |
[59]</</Test.prototype.run@http://localhost:50431/__testling?show=true:31487 |