Skip to content

Instantly share code, notes, and snippets.

@julbrs
julbrs / GetInfoObjectFile
Created January 27, 2017 19:25
Get File from an IInfoObject
package com.gbs.tools;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.logging.Logger;
import com.crystaldecisions.sdk.framework.CrystalEnterprise;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
import com.crystaldecisions.sdk.framework.ISessionMgr;
import com.crystaldecisions.sdk.occa.infostore.IFiles;
import com.crystaldecisions.sdk.occa.infostore.IInfoObject;
// ==UserScript==
// @name Bigger inputTextBox for BOE
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @match http://tampermonkey.net/index.php?version=4.2.7&ext=dhdg&updated=true
// @grant none
// @include http://sapb*dev.gbs*
@julbrs
julbrs / portalgun.ino
Created August 30, 2018 14:51
Portal Gun Arduino
/* Display 4-digit numbers on a 5643S Dixie LED tube
copyright Yilun Yu
tutorial: http://osoyoo.com/?p=222
*/
const int ledPin1 = 16;// the number of the LED pin
const int ledPin2 = 15;// the number of the LED pin
const int ledPin3 = 14;// the number of the LED pin
const int ledTop = 9;// the number of the LED pin
int ledState = LOW; // ledState used to set the LED
unsigned long previousMillis = 0; // will store last time LED was updated
@julbrs
julbrs / gist:0e3559c3b84211f5a51a1b44bad0955b
Created August 30, 2018 17:23
Create user on Oracle DB
Here is some SQL query to create an user with default auth:
CREATE USER eyes IDENTIFIED BY eyes DEFAULT TABLESPACE users;
GRANT CONNECT TO eyes;
GRANT RESOURCE TO eyes;
Drop an user:
DROP USER
eyes CASCADE;
@julbrs
julbrs / gist:661d49376fddaff0b1ba0b9f28afd330
Created August 30, 2018 17:23
Convert vob to ogv/mp4/webm for video balise
Here is the code with ffmpeg:
ffmpeg -i ete2012.vob -vcodec libtheora -b 400k -s 640x480 -acodec libvorbis -ab 64k ete2012.ogv
ffmpeg -i ete2012.vob -b 500k -s 640x480 -ab 64k -vcodec libx264 -acodec aac -strict experimental ete2012.mp4
ffmpeg -i ete2012.vob -b 500k -s 640x480 -ab 64k -vcodec libvpx -acodec libvorbis ete2012.webm
for f in *.AVI; do echo "Converting $f"; g=`basename $f .AVI`; ffmpeg -i $f -y -b 500k -ab 64k -vcodec libx264 -acodec aac -ar 44100 -strict experimental $g.mp4 || echo FAILED; ffmpeg -i $f -y -b 500k -ab 64k -vcodec libvpx -acodec libvorbis -ar 44100 $g.webm; done
Very easy, a new command have been introduced recently :
VBoxManage.exe modifyhd --resize size\_in\_mb\_wanted my\_disk.vdi
Then you will have to grow up wanted partition, to fit the new disk. The easiest way is to use GParted, from a SystemRescueCdfor example !
@julbrs
julbrs / README.md
Last active September 18, 2019 19:05
Installer BOXiR2/3.x sur CentOS 5.4

Installer CentOs 5.4

  • Installation réseau sur ftp://ftp.free.fr/mirrors/ftp.centos.org/5.4/os/i386/

  • Faire un partitionnement manuel tout le disque sur / de type ext2

  • Définir un nom d'hote sympa (genre centos1). Attention, après il faut que ce nom soit associé à l'adresse IP externe sur eth0, sinon l'exterieur ne pourra pas communiquer avec le serveur BO (il faut donc modifier le fichier /etc/hosts)

  • Installer le minimum de paquets

    Installer les VirtualBox Additions yum clean all yum install gcc -y

@julbrs
julbrs / awsco.py
Created December 14, 2018 17:41
Simple script to list/connect via *RDP/SSH* a AWS EC2 instance
#!/usr/bin/python3
from collections import defaultdict
import boto3
import sys
import os
import time
"""
A tool for retrieving basic information from EC2 instances. Then when you
@julbrs
julbrs / README.md
Last active December 13, 2019 15:49
Oracle cheat sheet

Oracle DB

Here is some SQL query to create an user with default auth:

CREATE USER user IDENTIFIED BY pw DEFAULT TABLESPACE users;
GRANT CONNECT TO user;
GRANT RESOURCE TO user;
ALTER USER user QUOTA UNLIMITED ON users;
ALTER USER user quota unlimited on users;
@julbrs
julbrs / - My BOBJ Toolbox.md
Last active January 23, 2020 14:25
BOBJ things

My BOBJ toolbox

Various scripts to help playing with a SAP Business Object system.

  • GetAllWebi.java will save webi files on disk
  • RescheduleInstance.java will generate instances to simulate a big system