Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
– The Git website
Choose one of the following options.
#!/bin/bash | |
FILES=`find -iname *.txt -print` | |
for FILE in $FILES | |
do | |
# replace the + to # chars | |
sed -i -r 's/^([+]{4})\s/#### /' $FILE | |
sed -i -r 's/^([+]{3})\s/### /' $FILE | |
sed -i -r 's/^([+]{2})\s/## /' $FILE | |
sed -i -r 's/^([+]{1})\s/# /' $FILE | |
sed -i -r 's/(\[php\])/<?php/' $FILE |
export PGPORT ?= 4488 | |
PG_PATH ?= $(shell if test -d /usr/lib/postgresql/9.1; then echo /usr/lib/postgresql/9.1; else echo /usr/lib/postgresql/8.4; fi) | |
PG_DIR = ${PWD}/instance/var | |
PG_DATA = ${PG_DIR}/data | |
PG_RUN = ${PG_DIR}/run | |
PG_LOG = ${PG_DIR}/log | |
PG_SOCKET = ${PG_RUN}/.s.PGSQL.${PGPORT} | |
PGPARAMS = -D ${PG_DATA} -o "-F -c unix_socket_directory=${PG_RUN} -c custom_variable_classes='busy' -c busy.active_user=0" -l ${PG_LOG}/pg.log | |
#!/bin/bash | |
# Run the below script only after "Install NDIS driver failed" error while trying to install Huawei modem drivers on linux. | |
# I checked this script on Ubuntu. | |
# Detailed explanation of this script was given here(http://askubuntu.com/a/414401/202806). | |
path="/usr/local/Mobile_Partner/driver" | |
if [ "$(ls -A $path)" ]; then | |
tput setaf 6; echo "Huawei modem drivers for linux are already installed on your pc.Please wait for NDIS driver installation."; tput sgr0 | |
perl -i -pe 's#^(\s*dbg \("can.t kmalloc dev"\);)#//$1#' /usr/local/Mobile_Partner/driver/ndis_driver/ndis_src/src/hw_cdc_driver.c | |
cd $path |
# -*- coding: utf-8 -*- | |
from zope.component.hooks import getSite | |
import logging | |
log = logging.getLogger(__name__) | |
def unregister_broken_persistent_components(context): | |
portal = getSite() | |
sm = portal.getSiteManager() |
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
– The Git website
Choose one of the following options.
Warning
This was written in 2005 so may be out of date. Originally published on the old Plone documentation section: https://plone.org/documentation/kb-old/debug-zodb-bloat/
Having spent a lot of time tracking down the cause of ZODB bloat in an Archetypes application I thought I'd share my experience in case it was useful to anyone else.
#!/bin/bash | |
# CONST 1GB | |
CONST_1GB="1024*1024*1024" | |
# VARIABLE WORKERS | |
CMD_W=0 |
# Author: Ryan Cole | |
# Website: https://ryanc.me | |
# GitHub: https://github.com/MGinshe | |
# Usage: | |
# Place this file in /etc/nginx/sites-enabled/ | |
# Make sure you edit the DOMAIN_HERE and SSL_CERTIFICATE, and DB_FILTER sections | |
# | |
# Note: This config file is designed to be used with the Odoo dbfilter_from_header module | |
# https://apps.openerp.com/apps/modules/9.0/dbfilter_from_header/ |
SHELL=/bin/bash | |
# to see all colors, run | |
# bash -c 'for c in {0..255}; do tput setaf $c; tput setaf $c | cat -v; echo =$c; done' | |
# the first 15 entries are the 8-bit colors | |
# define standard colors | |
ifneq (,$(findstring xterm,${TERM})) | |
BLACK := $(shell tput -Txterm setaf 0) | |
RED := $(shell tput -Txterm setaf 1) |