Skip to content

Instantly share code, notes, and snippets.

@antelio
antelio / code1.abap
Created December 5, 2011 17:18
SQL "*" for Inner join
DATA: wa_anek TYPE anek,
tb_anek TYPE TABLE OF anek,
wa_anep TYPE anep,
tb_anep TYPE TABLE OF anep,
tb_anep_fields TYPE TABLE OF string,
tb_anek_fields TYPE TABLE OF string.
INITIALIZATION.
DATA: l_string TYPE string.
@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 / script.gs
Last active March 19, 2018 13:41
Gmail Snooze V1.6 - 2015-06-04
// ---------------------------------------------------------------------------------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2015 Iain Brown - http://www.littlebluemonkey.com/gmail-snooze-without-mailboxapp/
//
// Inspired by http://gmailblog.blogspot.co.nz/2011/07/gmail-snooze-with-apps-script.html
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
@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