Skip to content

Instantly share code, notes, and snippets.

View jerome-diver's full-sized avatar
🏠
Working from home

Jérôme Lanteri jerome-diver

🏠
Working from home
  • Uruguay
View GitHub Profile
@jerome-diver
jerome-diver / pg_upgrade_server.log
Created November 19, 2016 08:59
failed to upgrade postgresql server from 9.5 to 9.6
-----------------------------------------------------------------
pg_upgrade run on Sat Nov 19 15:57:01 2016
-----------------------------------------------------------------
command: "/opt/pgsql-9.5/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/var/lib/postgres/data-9.5" -o "-p 50432 -b -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directories='/var/lib/postgres'" start >> "pg_upgrade_server.log" 2>&1
waiting for server to start....FATAL: data directory "/var/lib/postgres/data-9.5" has group or world access
DETAIL: Permissions should be u=rwx (0700).
stopped waiting
pg_ctl: could not start server
Examine the log output.
@jerome-diver
jerome-diver / mainwindow.cpp
Created October 15, 2016 03:58
try to show a video from camera source... i failed
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QtX11Extras/QX11Info>
#include <QVBoxLayout>
#include <QGst/Ui/VideoWidget>
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) {
ui->setupUi(this);
widgetVideo = new QGst::Ui::VideoWidget;
ui->videoVBOX->addWidget(widgetVideo);
@jerome-diver
jerome-diver / _form.haml
Last active September 25, 2016 04:18
my application.js of mon_site rails-4.2.6 used
- if @photo.errors.any?
#error_explanation
%h2
= pluralize(@photo.errors.count, "error")
prohibited this photo from being saved:
%ul
- @photo.errors.full_messages.each do |message|
%li= message
= simple_form_for(@photo) do |photo_form|
.row
@jerome-diver
jerome-diver / application.js
Created September 10, 2016 13:57
editor text_area appear on the first call, then no more instead of reload the page. turboloink has been disabled
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
@jerome-diver
jerome-diver / application.js
Created September 10, 2016 07:44
why rails-4 application doesn't care about delegate event for bind ajax ckeditor each time ?
// try it... but after the first call and cancel, the second call show that it serve nothing...
$(document).on('click', 'form[data-remote]', function(){
for (instance in CKEDITOR.instances){
CKEDITOR.instances[instance].updateElement(); } });
// try this... still doesn't change, still failed to load ckeditor on second call AJAX edition
$(document).on('ajax:before', 'form[data-remote]', function(){
for (instance in CKEDITOR.instances){
CKEDITOR.instances[instance].updateElement(); } });