- using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
- using inventory:
127.0.0.1 ansible_connection=local
ansible-playbook --connection=local 127.0.0.1 playbook.yml
127.0.0.1 ansible_connection=local
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
#include <stdio.h> | |
#include <string.h> | |
int main(void) { | |
char name1[18], name2[18], name3[18]; | |
char group1[3], group2[3], group3[3]; | |
char place1[30], place2[30], place3[30]; | |
unsigned int count1, count2, count3; | |
int col_len1 = 9, col_len3 = 16; | |
int name_len1, name_len2, name_len3; |
/* | |
Serve is a very simple static file server in go | |
Usage: | |
-p="8100": port to serve on | |
-d=".": the directory of static files to host | |
Navigating to http://localhost:8100 will display the index.html or directory | |
listing file. | |
*/ | |
package main |
#!/bin/bash | |
cat <<EOT > /etc/default/locale | |
LANGUAGE=en_US.UTF-8 | |
LC_ALL=en_US.UTF-8 | |
LANG=en_US.UTF-8 | |
LC_TYPE=en_US.UTF-8 | |
EOT | |
locale-gen en_US.UTF-8 |
-- Get Max ID from table | |
SELECT MAX(id) FROM table; | |
-- Get Next ID from table | |
SELECT nextval('table_id_seq'); | |
-- Set Next ID Value to MAX ID | |
SELECT setval('table_id_seq', (SELECT MAX(id) FROM table)); |
from django.db import models | |
class AbstractSeoContent(models.Model): | |
h1 = models.CharField('H1', max_length=255, blank=True) | |
meta_title = models.CharField(_('Title for page'), max_length=255, blank=True) | |
meta_description = models.CharField(max_length=255, blank=True) | |
meta_canonical = models.CharField(max_length=255, blank=True) | |
meta_keywords = models.CharField(max_length=255, blank=True) | |
meta_robots = models.CharField(max_length=255, blank=True) |
#!/usr/bin/env bash | |
# install docker | |
# https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
# install docker-compose | |
# https://docs.docker.com/compose/install/ | |
# install letsencrypt | |
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 |