When typing this :
git submodule update
Having this error :
fatal: destination path 'xxx' already exists and is not an empty directory.
fatal: clone of 'git@bitbucket.org:xxxxx/your-repo.git' into submodule path 'xxx' failed
Solution
git submodule deinit --force .
git submodule init
git submodule update --recursive
jeudi 9 août 2018
mardi 17 octobre 2017
File upload with Tornado
Demonstrates a server that receives a multipart-form-encoded set of files in an HTTP POST, or streams in the raw data of a single file in an HTTP PUT.
AND
Demonstrates uploading files to a server, without concurrency. It can either POST a multipart-form-encoded request containing one or more files, or PUT a single file without encoding.
https://github.com/tornadoweb/tornado/tree/master/demos/file_upload
AND
Demonstrates uploading files to a server, without concurrency. It can either POST a multipart-form-encoded request containing one or more files, or PUT a single file without encoding.
https://github.com/tornadoweb/tornado/tree/master/demos/file_upload
mardi 28 juin 2016
[Pip] Packaging and distributing project with git and pip
1- make the project "pip compatible"
in your project directory: nano setup.py
from setuptools import setup
setup(
name='testapp',
version='0.1',
description='A test application !',
url='http://github.com/testappli',
author='an_author',
author_email='author@author',
license='MIT',
packages=['xyz'],
install_requires=['cherrypy'],
zip_safe=False
)
2- how to install our project with pip from our private repository
retrieve project with pip:
pip install https://github.com/user/repository/archive/branch.zip
which becomes for django master:
pip install https://github.com/django/django/archive/master.zip
for django stable/1.7.x:
pip install https://github.com/django/django/archive/stable/1.7.x.zip
With BitBucket it's about the same predictable pattern:
pip install https://bitbucket.org/izi/django-admin-tools/get/default.zip
for a private Bitbucket repository:
pip install git+https://bitbucket.org/<bitbucket_username>/<repo_name>.git
Source : http://stackoverflow.com/questions/20101834/pip-install-from-github-repo-branch
Source : http://stackoverflow.com/questions/4830856/is-it-possible-to-use-pip-to-install-a-package-from-a-private-github-repository
Source : https://packaging.python.org/en/latest/distributing/
Source : https://python-packaging.readthedocs.io/en/latest/minimal.html
mkdir xyz (the package)
cd xyz
nano utils.py
def print_hello():
print("print_hello called")
nano __init__.py
#empty file
2- how to install our project with pip from our private repository
retrieve project with pip:
pip install https://github.com/user/repository/archive/branch.zip
which becomes for django master:
pip install https://github.com/django/django/archive/master.zip
for django stable/1.7.x:
pip install https://github.com/django/django/archive/stable/1.7.x.zip
With BitBucket it's about the same predictable pattern:
pip install https://bitbucket.org/izi/django-admin-tools/get/default.zip
for a private Bitbucket repository:
pip install git+https://bitbucket.org/<bitbucket_username>/<repo_name>.git
Source : http://stackoverflow.com/questions/20101834/pip-install-from-github-repo-branch
Source : http://stackoverflow.com/questions/4830856/is-it-possible-to-use-pip-to-install-a-package-from-a-private-github-repository
Source : https://packaging.python.org/en/latest/distributing/
Source : https://python-packaging.readthedocs.io/en/latest/minimal.html
[Git] init local project for bitbucket and first commit
1- create your repository on bitbucket
2- init local project:
mkdir /path/to/your/project
cd /path/to/your/project
git init
2- init local project:
mkdir /path/to/your/project
cd /path/to/your/project
git init
git remote add origin https://<bitbucket_username>@bitbucket.org/<bitbucket_username>/<repository_in_lower_case>.git
3- first commit:
echo "James Bond" >> contributors.txt
git add contributors.txt
git commit -m 'Initial commit with contributors'
git push -u origin master
3- first commit:
echo "James Bond" >> contributors.txt
git add contributors.txt
git commit -m 'Initial commit with contributors'
git push -u origin master
mercredi 20 avril 2016
[Linux] How to reinstall shutdown / reboot
First of all, check where they are :
After, check the package :
Source : http://askubuntu.com/questions/631929/reboot-and-shutdown-executables-missing
which shutdown
/sbin/shutdown
which reboot
/sbin/reboot
After, check the package :
$ dpkg -S /sbin/shutdown
upstart: /sbin/shutdown
$ dpkg -S /sbin/reboot
upstart: /sbin/reboot
Now we can reinstall :sudo apt-get install --reinstall upstart
Source : http://askubuntu.com/questions/631929/reboot-and-shutdown-executables-missing
dimanche 10 avril 2016
[Apache2] Too many processes
If you have a lot of instances of apache2, you can update the values for StartServers, MinSpareServers and MaxSpareServers:
<IfModule mpm_prefork_module>
StartServers 5 #at the begining
MinSpareServers 5 #min servers spare
MaxSpareServers 10 #max servers spare
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
Source : https://fuscata.com/kb/set-maxclients-apache-prefork
<IfModule mpm_prefork_module>
StartServers 5 #at the begining
MinSpareServers 5 #min servers spare
MaxSpareServers 10 #max servers spare
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
Source : https://fuscata.com/kb/set-maxclients-apache-prefork
jeudi 7 avril 2016
[LinkedIn] Build resume from profile
You can use the Linkedin CV chrome extension to generate a resume in PDF.
How to use
- Install the Linkedin CV extension.
- Go to your Linkedin profile and click the "View profile as" button. Because it will convert your complete profile not the editable one.
- Click the Linkedin logo in your browser address bar. Then your Linkedin profile will be converted.
- Press (Ctrl + P) to activate the print options in Google Chrome.
- From the options column on the left choose "Save as PDF" for destination.
- Click "Save" to save your CV.
How to use
- Install the Linkedin CV extension.
- Go to your Linkedin profile and click the "View profile as" button. Because it will convert your complete profile not the editable one.
- Click the Linkedin logo in your browser address bar. Then your Linkedin profile will be converted.
- Press (Ctrl + P) to activate the print options in Google Chrome.
- From the options column on the left choose "Save as PDF" for destination.
- Click "Save" to save your CV.
samedi 2 avril 2016
[MongoDB] Please ensure LANG and/or LC_* environment variables are set correctly.
When I run:
Solution:
mongoError message:
Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly.
Solution:
export LC_ALL=C
jeudi 12 novembre 2015
[AngularJS] retrieve param in url
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
var queryValue = getParameterByName('test_user_bLzgB');Then it is not necessary to enable html5 and to define a <base>...
Source : http://stackoverflow.com/a/28473677
dimanche 13 septembre 2015
[Ionic] Title in header not centered (Android issue)
Solution :
<ion-nav-bar align-title="center" class="bar-positive">or
$ionicNavBarDelegate.align('center');
$ionicNavBarDelegate.align('center');
Inscription à :
Articles (Atom)
Categories
- /etc/hosts (1)
- 443 (1)
- 80 (1)
- a2dp (1)
- addsubview (1)
- affix (1)
- amazon (1)
- android (6)
- angularjs (1)
- angularjs cross domain json post (1)
- angularjs ionic ng-click twice (1)
- animate (1)
- ansible (2)
- antlr (1)
- apache2 processes (1)
- app (1)
- app store (1)
- apple (1)
- appstore (1)
- avis (2)
- baignoire (1)
- basics (1)
- bitbucket (1)
- blackberry (1)
- bluetooth (1)
- booster (1)
- bootstrap (3)
- bottle (4)
- browsers (1)
- buffer (1)
- cherrypy (3)
- chromebook real life (1)
- coder (2)
- communicator (1)
- config.txt (1)
- creme chocolat (1)
- crepes bretonnes (1)
- crlf (1)
- css (2)
- cuisine (1)
- database (4)
- datatables (1)
- datetime (1)
- delete (1)
- disconnect (1)
- distributing (1)
- english (2)
- flask (1)
- fontawesome (1)
- francais (51)
- futuristic (1)
- game (1)
- gil (1)
- git (9)
- github (1)
- gratuit (2)
- hadopi (1)
- header (1)
- height zero (1)
- hibernate (1)
- hotel (2)
- http (1)
- https (2)
- ionic (2)
- ios (2)
- ios7 (1)
- iOS8 (1)
- iphone (1)
- jaune (1)
- java (7)
- javamelody (1)
- javascript (1)
- json (3)
- kindle (1)
- knockout (3)
- leaflet (1)
- legere (1)
- lf (1)
- life cycle (1)
- linkedin resume builder profile (1)
- linux (9)
- log (1)
- luxembourg (1)
- machine (1)
- maizena (1)
- minecraft (1)
- mobile (1)
- mongo (1)
- mongodb (3)
- mongodb mongo linux (1)
- multiple (1)
- myspace (1)
- mysql (1)
- netbeans cordova android cordova-plugin-file (1)
- nginx (2)
- nintendo (1)
- number (1)
- opensolaris (1)
- openstreetmap (1)
- oracle (15)
- order by (1)
- output (1)
- overclocking (1)
- packaging (1)
- parameters (1)
- personnaliser bootstrap (1)
- photos (1)
- pip (2)
- pipewire (1)
- prime (1)
- problem (2)
- project (1)
- publish (1)
- python (26)
- raspberry pi (2)
- raspi-config (1)
- recette (1)
- redirect (1)
- restful (2)
- schema (1)
- screen (1)
- screencast (1)
- script (1)
- scrollspy (1)
- serialization (1)
- sessions (2)
- shell (1)
- shutdown reboot linux reinstall apt-get (1)
- smartgwt (1)
- sncf (1)
- software (1)
- spring (1)
- sql (1)
- sticky footer (1)
- supervisor (1)
- systeme (1)
- tile (1)
- timestamp (1)
- title (1)
- tornado (3)
- turbo (1)
- ubuntu (2)
- uialertview (1)
- video capture (1)
- viewdidappear (1)
- viewdidload (1)
- viewwillappear (1)
- weasyprint (1)
- web (1)
- web2py (1)
- windows (5)
- worker (1)
- xbox wireless headset (1)
- xdk barcode scanner intel.xdk.device.barcode.scan (1)
- XDK rename project (1)
- xeno galaxies (1)