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 | |
from __future__ import division | |
import re | |
# This is a naive text summarization algorithm | |
# Created by Shlomi Babluki | |
# April, 2013 | |
class SummaryTool(object): |
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
Taken from:https://github.com/dnschneid/crouton/wiki/Build-kernel-headers-and-install-Virtualbox-(x86) | |
https://github.com/dnschneid/crouton/wiki/Build-kernel-headers-and-install-Virtualbox-(x86) | |
only pasted here so I can be sure I will always have it. | |
NB: do this ALTERNATIVE INSTEAD(it solves multi reboots on vagrant up) | |
1. build kernel headers as per this diff method: https://github.com/divx118/crouton-packages/blob/master/README.md | |
ie: from a shell in ua chroot(ubuntu) | |
$ cd ~ | |
$ wget https://raw.githubusercontent.com/divx118/crouton-packages/master/setup-headers.sh |
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
Generously taken from this discussion; https://github.com/dnschneid/crouton/issues/675 | |
They've created a wiki: https://github.com/dnschneid/crouton/wiki/Repack-kernel-to-Enable-VT_x-for-Virtualbox | |
You should check it out to see if anything has changed. | |
A. first of all install virtualbox correctly: https://gist.github.com/komuW/10991598. then; | |
1.Open a shell on your Chrome OS | |
ie while in in chromeOS; open browser, then ctrl+alt+T, then type shell, then press enter | |
2.Disable verified boot : |
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
############################## | |
#Creating a sale order including the products.# | |
import oerplib | |
oerp = oerplib.OERP('localhost', protocol='xmlrpc', port=8069) | |
user = oerp.login('user', 'passwd', 'db_name') | |
#create a dictionary with fields and their values. the dict ought to have at a minimum all the fields that are marked required=True for that model | |
sale_order_dict = { | |
'picking_policy': 'direct', | |
'currency_id': 98, |
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
#python script for fibonacci between 1 and 100 | |
#example: 1,2,3,5,8,13 | |
hold=[] | |
temp1 = 1 | |
temp2 = 2 | |
hold.append(temp1); hold.append(temp2) | |
for i in range(3, 101): | |
temp3 = temp1 + temp2 |
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
If for any reason you don't have a GUI VPN client(you like running headless ubuntu | |
or have ubuntu installed on a chromebook). You can use vpnc as a command line VPN client | |
#this is a comment | |
#install vpnc | |
$ sudo apt-get install network-manager-vpnc | |
#look to see if you have vpnc installed | |
$ sudo vpnc --help #use sudo to run vpnc command | |
#if not installed, install it: | |
$ sudo apt-get install vpnc |
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
#first seen here: http://www.snip2code.com/Snippet/63701/Ansible-task-to-install-nvm-and-node | |
# Here is how to install nvm and node in an Ansible task. | |
# I tried a bunch of different things, and as usual it's simple, but you have to get it right. | |
# The important part is that you have to shell with /bin/bash -c and source nvm.sh | |
--- | |
- name: Install nvm | |
shell: > | |
curl https://raw.githubusercontent.com/creationix/nvm/v0.7.0/install.sh | sh | |
creates=/home/{{ ansible_user_id }}/.nvm/nvm.sh |
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
1. open a browser and go to https://goo.gl/fd3zc, that will download crouton | |
2. hit Ctrl+alt+T and then type shell and press enter | |
$ shell | |
3. install ubuntu via | |
$ sudo sh ~/Downloads/crouton -r trusty -t xfce | |
#that will install ubuntu 14.04 with xfce desktop environment | |
4. to list available versions: |
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
INFO global: Vagrant version: 1.7.1 | |
INFO global: Ruby version: 2.0.0 | |
INFO global: RubyGems version: 2.0.14 | |
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.1/bin/vagrant" | |
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/bin/../embedded" | |
INFO global: VAGRANT_INSTALLER_VERSION="2" | |
INFO global: VAGRANT_DETECTED_OS="Linux" | |
INFO global: VAGRANT_INSTALLER_ENV="1" | |
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1" | |
INFO global: VAGRANT_LOG="debug" |
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
set daemon 600 #in seconds | |
set logfile /home/webapp/log/monit.log | |
check process rabbit with pidfile /var/run/odoo.pid | |
start program = "/etc/init.d/odoo start" | |
stop program = "/etc/init.d/odoo stop" |
OlderNewer