Ref: https://gist.github.com/rnwolf/e09ae9ad6d3ac759767d129d52cab1f1
Key Binding | Description |
---|---|
SPC | < space > |
RET | < return > |
C | < ctrl > |
M | < alt >, M stands for Meta |
let | |
nixpkgs-src = builtins.fetchTarball { | |
# 22.11 | |
url = "https://github.com/NixOS/nixpkgs/archive/nixos-22.11.tar.gz"; | |
}; | |
pkgs = import nixpkgs-src { | |
config = { | |
# allowUnfree may be necessary for some packages, but in general you should not need it. | |
allowUnfree = false; |
Ref: https://gist.github.com/rnwolf/e09ae9ad6d3ac759767d129d52cab1f1
Key Binding | Description |
---|---|
SPC | < space > |
RET | < return > |
C | < ctrl > |
M | < alt >, M stands for Meta |
import os | |
import yaml | |
import logging.config | |
import logging | |
import coloredlogs | |
def setup_logging(default_path='logging.yaml', default_level=logging.INFO, env_key='LOG_CFG'): | |
""" | |
| **@author:** Prathyush SP | |
| Logging Setup |
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
import sys | |
from argparse import ArgumentParser | |
parser = ArgumentParser(description="Recompute parent_left, parent_right") | |
parser.add_argument('odoo_basedir') | |
parser.add_argument('odoo_cfg') | |
parser.add_argument('odoo_db') | |
parser.add_argument('model', help='Odoo model, e.g. account.account') |
zcat /var/log/postgresql/postgresql-9.6-main.log.3.gz | grep 'due to concurrent update' | awk 'BEGIN {time="--"; count=0} {x=substr($2,1,2); if (time !=x) {printf "%s,%d\n", time, count; time=x; count=0;} count=count+1;} END {printf "%s,%d\n", time, count}' |
ps -eo stat,cmd,size | grep -E '^R\s+python /odoo/odoo-server.*' |
// Load the TCP Library | |
net = require('net'); | |
// Keep track of the chat clients | |
var clients = []; | |
// Start a TCP Server | |
net.createServer(function (socket) { | |
// Identify this client |
* | |
* TestBC.prg | |
* | |
* Test printing barcode | |
* | |
#DEFINE BCT_EAN13 0 | |
#DEFINE BCT_EAN8 1 | |
#DEFINE BCT_INT25 2 | |
#DEFINE BCT_UPCA 3 |