Skip to content

Instantly share code, notes, and snippets.

View komuw's full-sized avatar

Komu Wairagu komuw

View GitHub Profile
#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
@komuw
komuw / create_sale_order.py
Last active August 6, 2020 22:48
Creating and updating a sale.order in openERP
##############################
#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,
@komuw
komuw / enable vt-x in chromebook
Last active April 11, 2024 23:33
How To enable VT-x support in chromebook
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 :
@komuw
komuw / how to properly install virtualbox on chromebook
Last active January 30, 2025 03:48
how to properly install virtualbox on chromebook.
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
# 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):