Skip to content

Instantly share code, notes, and snippets.

View bollu's full-sized avatar

Siddharth bollu

View GitHub Profile

Steps to upgrade vim in arch linux for python runtime support

Python support is needed by vim in order to run things like Conque and Slimv. Arch keeps vim slim by only providing Python support in gvim. But you may prefer vim to gvim, so here's what's needed.

More ABS info.

# Install and run abs (sync)

sudo pacman -S abs

@bollu
bollu / gists.rb
Created March 13, 2014 14:26 — forked from trevorturk/gists.rb
# gem install httparty
# ruby gists.rb
require 'httparty'
class Gists
include HTTParty
@username = 'x'
@password = 'x'
//required to compute frequencies from notes
1.05946 => float TwelthRoot2;
class Note {
int note_number;
fun Note relativeNote(int deltaSemitone) {
Note note;
note_number + deltaSemitone => note.note_number;
return note;
import requests
from bs4 import BeautifulSoup
if __name__ == "__main__":
payload = {'reg': 'AA002', 'frm_tokens' :0.6877558 }
doc = requests.post("http://karresults.nic.in/cetresult2014.asp", data=payload).text
import requests
from bs4 import BeautifulSoup
import copy
class ID:
def __init__(self):
self.let1 = ord('A')
self.let2 = ord('A')
Introduction
============
the [OVPL (One VM per lab) project](https://github.com/vlead/ovpl) makes use of [openVZ](http://openvz.org/Main_Page) to host "Virtual Labs". Each lab is created on a separate container, hence the name one VM (container) per lab. These containers are created by interacting with openVZ, a virtualization tool for linux.
One of the problems of OpenVZ is that it can __only be deployed as a kernel level patch__. Since OVPL depends on openVZ, this requires one to have a compliant kernel. Therefore, one requires an OS which provides a linux kernel patched with OpenVZ ([CentOS](http://www.centos.org/) for example, does this).
The other way around this is to run an OS which provides a compliant kernel by using a VM. This tutorial willuse this method (setting up a [CentOS](http://www.centos.org/) VM) because it is far more practical.

Figure out a better way to run vzctl than blindly looking for /sbin/. this folder need not exist on certain distributions.

Write the part about rsyncing the OS template into the wiki

For the love of god initlialize all variables and setup proper type checking in this, we can't have it blow up thanks to a wrongly returned type

* 1) bin: rustc ../src/main.rs -L ../lib/ -o fs
<std macros>:6:9: 6:32 error: instantiating a type parameter with an incompatible type `&str`, which does not fulfill `Send`
<std macros>:6 ::std::rt::begin_unwind($msg, file!(), line!())
^~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 26:2 note: in expansion of fail!
../src/types.rs:41:4: 42:4 note: expansion site
error: aborting due to previous error
pub struct CopyFileOperation {
src_path: &Path,
dest_path: &Path,
src_file: Option<File>,
dest_file: Option<File>,
KB_per_cycle: uint,
done: bool,
mm@cereal:~/dytest$ rustc -C prefer-dynamic --crate-type=dylib fooz.rs
mm@cereal:~/dytest$ cat fooz.rs
#[no_mangle]
pub extern "C" fn foo(x: int) {
println!("Cowabunga, {}", x);
}
mm@cereal:~/dytest$ cat test.py
import ctypes
fooz = ctypes.CDLL("/home/mm/dytest/libfooz-afaf02c9-0.0.so")