Skip to content

Instantly share code, notes, and snippets.

@antelio
antelio / install-toolbox.sh
Last active May 9, 2021 01:34 — forked from greeflas/install-toolbox.sh
JetBrains Toolbox installation script for Ubuntu - https://www.jetbrains.com/toolbox/app/
#!/bin/bash
set -e
if [ -d ~/.local/share/JetBrains/Toolbox ]; then
echo "JetBrains Toolbox is already installed!"
exit 0
fi
echo "Start installation..."
@antelio
antelio / gist:563e54745ed30a3d7d5d72f3e4d4582c
Last active February 1, 2019 13:00 — forked from qbrossard/gist:6150277
Basic setup for a vagrant box with jruby for JRuby on Rails development
# vagrant config for jruby rails dev.
# prereqs: vagrant + virtualbox installed
# ubuntu box
vagrant init bento/ubuntu-18.10
# login
vagrant ssh
# java setup
@antelio
antelio / bash-colors.md
Created March 16, 2018 12:42 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@antelio
antelio / noip2.service
Last active March 19, 2018 13:41 — forked from NathanGiesbrecht/noip2.service
Systemd Service file for no-ip.com dynamic ip updater
# Simple No-ip.com Dynamic DNS Updater
#
# By Nathan Giesbrecht (http://nathangiesbrecht.com)
#
# 1) Install binary as described in no-ip.com's source file (assuming results in /usr/local/bin)
# 2) Run sudo /usr/local/bin/noip2 -C to generate configuration file
# 3) Copy this file noip2.service to /etc/systemd/system/
# 4) Execute `sudo systemctl enable noip2`
# 5) Execute `sudo systemctl start noip2`
#
@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
@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 / 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 / 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 / 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 / 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 ).