Skip to content

Instantly share code, notes, and snippets.

View gist:9eec03d0069a880faf38
array = ['Tree','Log','Table','Chair']
myVar = 'Cat'
if myVar not in array:
print "It's not in the array!"
myVar = ''
@chrisjsimpson
chrisjsimpson / gist:789cdb6b244cd62e9fad
Created Sep 5, 2015
Decimal to valid EAN code taken from OpenERP POS demo
View gist:789cdb6b244cd62e9fad
function openerp_pos_devices(instance,module){ //module is instance.point_of_sale
var _t = instance.web._t;
// the JobQueue schedules a sequence of 'jobs'. each job is
// a function returning a deferred. the queue waits for each job to finish
// before launching the next. Each job can also be scheduled with a delay.
// the is used to prevent parallel requests to the proxy.
module.JobQueue = function(){
@chrisjsimpson
chrisjsimpson / mosre_hastle_than_its_worth.php
Created Aug 27, 2012
php cli exploit-db.com search via command line
View mosre_hastle_than_its_worth.php
<?php
/* Terminal sript for fast searching of the exploit-db.com/search page
*
* Requires: php5, curl, php-cli, w3m (use sudo apt-get install programName)
*
* For defaults just leave questions blank & press enter.
*
* Notes for improvement:
* > No pagination support (only shows page one of results)
* > Writes search result to a file- this is messy, must be better way