TIP: When there is Internet latency and requires installing python packages, run this command with the parameter enabled timeout:
pip install -r requirements.txt --timeout 120
TIP: When there is Internet latency and requires installing python packages, run this command with the parameter enabled timeout:
pip install -r requirements.txt --timeout 120
#!/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 |
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 | |
Install two (02) Bower packages like jquery 2.2.4 and pickadate 3.5.6 with Composer configuration for Yii2 project
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
#!/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 |
#!/usr/bin/python | |
""" | |
Find the most complex functions/methods in your python code. | |
This program is offered freely into the public domain by | |
Gary Wilson ([email protected]). | |
This code requires the complexity shell scripts found at | |
http://journyx.com/curt/complexity.html |
# Source https://plus.google.com/102636120635048200626/posts/HMk2yNfysQN | |
from Products.statusmessages.interfaces import IStatusMessage | |
IStatusMessage(self.request).addStatusMessage('Hello World', type='info') |
*~ | |
*.pyc | |
*.pyo | |
*.tmp* | |
*.mo | |
*.egg | |
*.EGG | |
*.egg-info | |
*.EGG-INFO | |
*.kpf |
[buildout] | |
extends = http://dist.plone.org/release/4.3-latest/versions.cfg | |
find-links = | |
http://dist.plone.org/release/4.3-latest/ | |
http://dist.plone.org/thirdparty/ | |
show-picked-versions = true | |
eggs = | |
unzip = true | |
versions = versions |
[buildout] | |
extends = http://dist.plone.org/release/4.3-latest/versions.cfg | |
find-links = | |
http://dist.plone.org/release/4.3-latest/ | |
http://dist.plone.org/thirdparty/ | |
show-picked-versions = true | |
eggs = | |
unzip = true | |
versions = versions |