-
Create folder to chroot
mkdir /opt/sftp
-
Change ownership
chown root:root /opt/sftp
-
Change mode
chmod go-w /opt/sftp
-
Change sshd config
/etc/ssh/sshd_config
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
/* | |
Run on https://www.openerp.com/partners/directory/ | |
*/ | |
var countries = Array(); | |
$(".oe_countries ul li a").each(function(){ | |
if ($(this).attr("href") != undefined) | |
countries.push({ | |
"Link": $(this).attr("href"), | |
"Name": $(this).html(), |
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
#!/usr/bin/env python | |
''' | |
Install package from .travis.yml | |
usage: travis_setup.py | |
@author Tarun Bhardwaj | |
@license FreeBSD Licence | |
''' |
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
#!/usr/bin/env python | |
""" tryton_shell: A dirty shell for Tryton to quickly interact with it | |
usage: tryton_shell.py [-h] --config CONFIG --database DATABASE | |
arguments: | |
--config CONFIG Tryton config file. | |
--database DATABASE Tryton database. | |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Jinja2 static site renderer using Flask | |
@author Tarun Bhardwaj | |
@license FreeBSD Licence | |
""" | |
from flask import Flask, abort, render_template | |
from jinja2 import TemplateNotFound |
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/bash | |
usage() | |
{ | |
cat << EOF | |
usage: $0 options | |
This script set ownership for all table, sequence and views for a given database | |
Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto |
Follow this blog for 9.6 https://edwardsamuel.wordpress.com/2016/04/28/set-up-postgresql-9-5-master-slave-replication-using-repmgr/
Keep replication config separate as explained here.
While cloning slave use following:
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
# -*- coding: utf-8 -*- | |
""" | |
move_google_datastore | |
Move google datastore data to different project / different account. | |
:license: MIT | |
""" | |
from google.cloud import datastore | |
from google.cloud.datastore.entity import Entity |
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
# Fix borken python links in all venv | |
cd ~/.virtualenvs | |
for i in `workon` | |
do | |
if [ $(find $i/ -type l | tail -n 1 | grep "python3") ]; then | |
echo "$i python3" | |
find $i/ -type l -delete | |
virtualenv $i --python=python3 |