Skip to content

Instantly share code, notes, and snippets.

@antelio
antelio / ZABAPSRC_SOLR_INDEX.abap
Last active August 29, 2015 14:11 — forked from mydoghasworms/ZABAPSRC_SOLR_INDEX.abap
ZABAPSRC_SOLR_INDEX
e*&---------------------------------------------------------------------*
*& Report ZABAPSRC_SOLR_INDEX
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZABAPSRC_SOLR_INDEX.
@antelio
antelio / shBrushAbap.js
Last active August 29, 2015 14:11 — forked from christianjianelli/shBrushAbap.js
ABAP Sintax Higlighter
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*e
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
@antelio
antelio / SCAN ABAP SOURCE
Last active March 19, 2018 13:42 — forked from furlan/SCAN ABAP SOURCE
SCAN ABAP SOURCE
form fetch_source_code.
data:
lc_table(10) type c, " table name
lc_program(30) type c, " program name
ln_statement(05) type n, " statement counter
lc_field(10) type c, " field name
li_discard type i, " discard analysis
li_sourcestart type i, " source statement start line
li_sourceend type i, " source statement end line
@antelio
antelio / itab_to_json.abap
Last active August 29, 2015 14:11 — forked from RiverSongFox/itab_to_json.abap
ITAB_TO_JSON
*&---------------------------------------------------------------------*
*& Form ITAB_TO_JSON
*&---------------------------------------------------------------------*
* Get JSON representation of any plain internal table
*----------------------------------------------------------------------*
FORM itab_to_json USING it_abap TYPE STANDARD TABLE
CHANGING et_json TYPE string.
DATA : lo_object_info TYPE REF TO cl_abap_structdescr
, lw_attribute_info TYPE abap_compdescr.
@antelio
antelio / get_attributes
Last active March 19, 2018 13:42
ABAP Get Attributes
METHOD get_attributes.
DATA:
lo_ref_obj TYPE REF TO cl_abap_objectdescr.
FIELD-SYMBOLS:
<attr_desc> TYPE abap_attrdescr.
" Get class description
lo_ref_obj ?= cl_abap_classdescr=>describe_by_object_ref( me ).
@antelio
antelio / ABAP_Dynamic_Struct.abap
Last active October 30, 2015 14:32 — forked from edegula/ABAP_Dynamic_Struct.abap
ABAP_Dynamic_Struct
*----------------------------------------------------------------
* METHOD create_tab_for_display
* IMPORTING
* edo_table type ref to data
* edo_struc type ref to data.
*----------------------------------------------------------------
method create_tab_for_display.
data:
go_sdescr_new type ref to cl_abap_structdescr,
@antelio
antelio / gist:136a5171e984a3e46533
Last active March 19, 2018 13:42 — forked from keit/gist:6288233
Rails4 + Bower + Bootstrap set-up
This document is outdated.
You should read David Bryant Copeland's excellent online book: http://angular-rails.com/crud_recipe.html
---------------------------------------------------------------------------------------------------------------
I think it's better to install javascript/css libraries using Bower rather than gem which is Ruby packager.
1. Install Rails 4 and create a new project.
2. Install bower(Note you need to install node first.)
sudo npm install -g bower
@antelio
antelio / port_open.rb
Created November 27, 2015 18:24 — forked from ashrithr/port_open.rb
check if port is open on a remote host
#!/usr/bin/env ruby
require 'socket'
require 'timeout'
unless ARGV.length == 2
abort "Usage: ruby #{__FILE__} HOST PORT"
end
def port_open?(ip, port, seconds=1)
# => checks if a port is open or not on a remote host
Timeout::timeout(seconds) do
@antelio
antelio / json_util.abap
Created May 31, 2016 02:38 — forked from mydoghasworms/json_util.abap
ABAP Utility class for mapping JSON to ABAP data and vice versa
*----------------------------------------------------------------------*
* CLASS json_util DEFINITION
*----------------------------------------------------------------------*
class json_util definition.
public section.
class-methods:
data_to_json importing data type any
returning value(json) type string,
json_to_data importing json type string
changing data type any.
@antelio
antelio / btsync.service
Last active March 19, 2018 13:43 — forked from miry/btsync.service
Simple Systemd services for my local server
# create /etc/systemd/system/btsync.service
# systemctl start btsync.service
# systemctl status btsync.service
# systemctl enable btsync.service
[Unit]
Description=BTSync daemon
[Service]
#Type=forking
PIDFile=/run/btsync/btsync.pid