Skip to content

Instantly share code, notes, and snippets.

View jbq's full-sized avatar

Jean-Baptiste Quenot jbq

View GitHub Profile
@jbq
jbq / gist:1196892
Created September 6, 2011 07:56
varnishncsa 3.0.1 rc1 header crash
Core was generated by `/usr/bin/varnishncsa -a -c -w /var/log/nomao/varnishncsa.log -D -P /var/run/var'.
Program terminated with signal 6, Aborted.
#0 0x00007f77280edd05 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007f77280edd05 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f77280f1ab6 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x0000000000403dc5 in VAS_Fail_default (func=0x40640f "collect_client", file=0x405b5a "varnishncsa.c", line=453, cond=0x405bc9 "(split) != 0", err=0, xxx=0) at ../../lib/libvarnish/assert.c:59
#3 0x000000000040272d in collect_client (lp=0xe48f90, tag=SLT_RxHeader, spec=1, ptr=0x7f7725deda74 <Address 0x7f7725deda74 out of bounds>, len=14) at varnishncsa.c:453
#4 0x0000000000402e03 in h_ncsa (priv=0xe25bf0, tag=SLT_RxHeader, fd=527, len=14, spec=1, ptr=0x7f7725deda74 <Address 0x7f7725deda74 out of bounds>, bitmap=0) at varnishncsa.c:558
#5 0x00007f7728676f18 in VSL_Dispatch (vd=0xe24010, func=0x402b82 <h_ncsa>, priv=0xe25bf0) at vsl.c:318
@jbq
jbq / gist:3149858
Created July 20, 2012 09:26
Found a gem in our code
/**
* in the case of a cron bot we have no request. getInstance(null) try to access to the session and crash.
* @return
*/
public static function getBotInstance()
{
return new self(null);
}
@jbq
jbq / uwsgi-watch-wc
Last active April 4, 2019 11:21
Python script using pyinotify to detect changes in a working copy, and notify UWSGI to reload app. To be used along with UWSGI's "attach-daemon" option.
#! /usr/bin/python
import pyinotify, sys, os, signal, threading, time, syslog
lastEventTime = None
def iswatched(path):
return (path.endswith(".tmpl") or path.endswith(".py"))
def callback(evt):
@jbq
jbq / gist:6577454
Created September 16, 2013 07:02
uwsgi-watch-wc
#! /usr/bin/python
import pyinotify, sys, os, signal, threading, time, syslog
lastEventTime = None
def iswatched(path):
return (path.endswith(".tmpl") or path.endswith(".py"))
def callback(evt):
$ git clone bzr::lp:openobject-addons/7.0
Cloning into '7.0'...
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
Traceback (most recent call last):
File "/home/jbq/usr/bin/git-remote-bzr", line 982, in <module>
sys.exit(main(sys.argv))
File "/home/jbq/usr/bin/git-remote-bzr", line 962, in main
Traceback (most recent call last):
File "/Users/jbq/Dropbox/CML-ID/Lib/pycmlid/scripts/excel_writer_stats_by_month", line 49, in <module>
wb.save("%s.xlsx" % table)
File "/Library/Python/2.7/site-packages/openpyxl/workbook.py", line 263, in save
save_dump(self, filename)
File "/Library/Python/2.7/site-packages/openpyxl/writer/dump_worksheet.py", line 254, in save_dump
writer.save(filename)
File "/Library/Python/2.7/site-packages/openpyxl/writer/excel.py", line 170, in save
self.write_data(archive)
File "/Library/Python/2.7/site-packages/openpyxl/writer/excel.py", line 76, in write_data
SQL> select count(*) a, trim(oachid) from oohead where oaadid='ÚÚÚÚÚÚ' and oaordt like '2014%' group by trim(oachid) order by a desc
+------------+-----------+
| A | 00002 |
+------------+-----------+
| 175 | FACTURELV |
| 93 | MANDRE |
| 53 | AHONCZARUK|
| 40 | SMORAND |
| 20 | SVALCROZE |
| 19 | AIVARS |
SQL> select count(*) a, okcfc1, cttx40 from oohead left join ocusma on oacuno=okcuno left join csytab on ctstco='CFC1' and ctstky=okcfc1 where oaadid='ÚÚÚÚÚÚ' and oaordt like '2014%' group by okcfc1, cttx40 order by a desc
+------------+-----------+-----------------------------------------+
| A | OKCFC1 | CTTX40 |
+------------+-----------+-----------------------------------------+
| 152 | 400DC | André Myriam |
| 91 | 400VK | Morand Stéphanie |
| 57 | 400M1 | Valcroze Sandrine |
| 42 | 400F1 | Ivars Amandine |
| 36 | 400ND | Deschamp Nelly |
| 32 | 400Y1 | Nguyen Véronique |
Nov 24 09:12:47 127.0.0.1 Accès refusé
Désolé, vous n'êtes pas autorisé à accéder à ce document. Seuls les utilisateurs avec les niveaux d'accès suivants sont actuellement autorisé à faire cela:
- Purchases/User
- Purchases/Manager
- Warehouse/User
(Modèle de document: purchase.order)
Traceback (most recent call last):
File "/srv/dropbox/Dropbox (CML-ID)/OpenCMLRepo/Prod/odoo/openerp/netsvc.py", line 298, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
2014-11-28T10:07:50+01:00 EMERG (0): 14 MB | () [23]: [Exception] with message: Call to undefined method getFournisseur in class Object_FamilleAGE
In file: /srv/pimcore/data/pimcore/lib/Pimcore/Model/Abstract.php on line 225
#0 /srv/pimcore/data/pimcore/models/Object/Abstract.php(1021): Pimcore_Model_Abstract->__call('getFournisseur', Array)
#1 /srv/dropbox/Dropbox (CML-ID)/PimcoreRepo/Prod/ExtendedList/controllers/ExtendedlistController.php(663): Object_Abstract->__call('getFournisseur', Array)
#2 /srv/dropbox/Dropbox (CML-ID)/PimcoreRepo/Prod/ExtendedList/controllers/ExtendedlistController.php(663): Object_FamilleAGE->getFournisseur()
#3 /srv/pimcore/data/pimcore/lib/Zend/Controller/Action.php(516): ExtendedList_ExtendedlistController->gridProxyAction()
#4 /srv/pimcore/data/pimcore/lib/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('gridProxyAction')
#5 /srv/pimcore/data/pimcore/lib/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Con