Abinash Bishoyi AbinashBishoyi

View Vagrantfile
1 2 3 4 5 6 7 8 9 10
# -*- mode: ruby -*-
# vi: set ft=ruby :
 
# To use this script and prepare your build environment, run the following
# command in the same directory as the Vagrantfile.
# B2G_PATH={path to your B2G directory} vagrant up
 
VAGRANTFILE_API_VERSION = "2"
 
# This script will be run on the first start and it will set up the build
View gist:8018273
1 2 3 4 5 6 7 8 9 10
#! /bin/bash
 
REMOTE_REPO="svn://path/to/remote/repo"
LOCAL_REPO="/path/to/local/repo"
 
REMOTE_REV=`svn info $REMOTE_REPO | grep '^Revision:' | awk '{print $2}'`
LOCAL_REV=`svn info $LOCAL_REPO | grep '^Revision:' | awk '{print $2}'`
 
if [ $REMOTE_REV -eq $LOCAL_REV ]; then
exit 0;
View gist:5238389
1
my $qry = "SELECT * FROM table WHERE UPPER(name1) LIKE DECODE(NVL('" . $start . "',0),0,'%" . $contain . "%','" . $start . "%') AND UPPER(name1) LIKE DECODE(NVL('" . $contain . "',0),0,'" . $start . "%','%" . $contain . "%') ORDER BY .....";
View gist:3840059
1
awk '{if($2!=""){if(min==""){min=max=$2}; if($2>max) {max=$2}; if($2< min) {min=$2}; total+=$2; count+=1; if($2>10){print $0}}} END {print total, count, min, max}' test_vec.log
View gist:3761050
1 2 3 4 5 6 7 8 9 10
#!/usr/local/bin/perl
 
# Perl Routines to Manipulate CGI input
#
# Copyright (c) 1995 Steven E. Brenner
# Permission granted to use and modify this library so long as the
# copyright above is maintained, modifications are documented, and
# credit is given for any use of the library.
#
# Thanks are due to many people for reporting bugs and suggestions
View gist:3761047
1 2 3 4 5 6 7 8 9 10
# Perl Routines to Manipulate CGI input
# cgi-lib@pobox.com
# $Id: cgi-lib.pl,v 2.18 1999/02/23 08:16:43 brenner Exp $
#
# Copyright (c) 1993-1999 Steven E. Brenner
# Unpublished work.
# Permission granted to use and modify this library so long as the
# copyright above is maintained, modifications are documented, and
# credit is given for any use of the library.
#
View gist:3761023
1 2 3 4 5 6 7 8 9 10
#!/usr/local/bin/perl
#
# Subroutine to read CGI input.
# Script stuck together from work by S.E.Brenner@bioc.cam.ac.uk
# and ronnie@scs.leeds.ac.uk by nik@scs.leeds.ac.uk
#
# Subroutine &read_input takes and decodes data either from
# QUERY_STRING (for GET method, default) or STDIN (for POST method)
# Returned is an associative array of names and values.
#
View gist:3716554
1 2 3 4 5 6 7 8 9 10
#http://www.team2053.org/docs/bashcgi/postdata.html
#This code for getting code from post data is from http://oinkzwurgl.org/bash_cgi and
#was written by Phillippe Kehi <phkehi@gmx.net> and flipflip industries
 
# (internal) routine to store POST data
function cgi_get_POST_vars()
{
# check content type
# FIXME: not sure if we could handle uploads with this..
[ "${CONTENT_TYPE}" != "application/x-www-form-urlencoded" ] && \
View gist:1921390
1 2 3 4 5 6 7 8 9 10
#include<iostream>
#include<stdlib.h>
#include<sys/time.h>
 
using namespace std;
 
class quick
{
public:
int partition(int a[],int high ,int low);
View pixel_inversion.cpp
1 2 3 4 5 6 7 8 9
// Invert the color spectrum
Surface::Iter iter(newSurface.getIter());
while(iter.line()) {
while(iter.pixel()) {
iter.r() = 255 - iter.r();
iter.g() = 255 - iter.g();
iter.b() = 255 - iter.b();
}
}
Something went wrong with that request. Please try again.