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
-- here's my table with some data in it | |
CREATE TABLE sample ( client_id INT ); | |
INSERT INTO sample VALUES (1); | |
-- here's the challenge; if my app has values 1, 2, and 3, I want a query that returns '2' and '3'... i.e., all values not currently in the 'sample' table. CTE to the rescue. | |
WITH app_client_ids(client_id) AS (VALUES(1), (2), (3)) | |
SELECT client_ID from app_client_ids WHERE client_id NOT IN (SELECT client_id FROM sample); | |
-- result from psql: |
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
<configuration scan="true"> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern>%d{MMMdd HH:mm:ss.SSS} %8.8thread %3.-3level %15.-15logger{0} %msg %X %n</pattern> | |
</encoder> | |
</appender> | |
<root level="DEBUG"> | |
<appender-ref ref="STDOUT"/> | |
</root> |
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
# safe-network listener to place | |
# Do a put to http://internal:9000/gems/gemname.gem | |
# curl -T some.gem http://internal:9000/gems/some.gem | |
server { | |
listen 9000; | |
root /var/www/data/gems; | |
client_body_temp_path /tmp; | |
server_name localhost; | |
dav_methods PUT DELETE; | |
create_full_put_path on; |
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
# first create a user in the database that is your current username (answer 'y' for superuser if this is a development machine.) | |
sudo su postgres -c "createuser seth" | |
# create a database of the same name, so that just typing 'psql' will drop you into the psql command-line against database 'seth' | |
sudo su postgres -c "createdb seth --owner seth" | |
# now you don't need to sudo for any subsequest pg commands, if you are logged in as this user, for example: | |
initdb /var/lib/pgsql91/data | |
createdb "test_this" |
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
<!-- untested !--> | |
<!-- organization = should be name of the github user --> | |
<!-- module = should be name of the project --> | |
<!-- revision = should be name of branch or tag --> | |
<!-- example: https://github.com/isaacs/npm/tarball/master --> | |
<url name="git-tarball"> | |
<artifact pattern="https://github.com/[organization]/[module]/tarball/[revision]"/> |
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
[rpmbuild@localhost dhcpgen-listener]$ rvm --trace rvmrc trust /home/rpmbuild/dhcpgen-listener/target/src/dhcpgen-listener | |
+ [[ -n '' ]] | |
+ export 'PS4=+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > ' | |
+ PS4='+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > ' | |
+ /scripts/cli : __rvm_parse_args() 790 > [[ -z '' ]] | |
+ /scripts/cli : __rvm_parse_args() 790 > [[ -n '' ]] | |
+ /scripts/cli : __rvm_parse_args() 792 > [[ 0 -eq 1 ]] | |
+ /scripts/cli : __rvm_parse_args() 792 > [[ -n '' ]] | |
+ /scripts/cli : __rvm_parse_args() 13 > [[ -n rvmrc ]] | |
+ /scripts/cli : __rvm_parse_args() 15 > rvm_token=rvmrc |