Skip to content

Instantly share code, notes, and snippets.

View Ripley6811's full-sized avatar

Jay W Johnson Ripley6811

View GitHub Profile
@Ripley6811
Ripley6811 / gist:a3ddbb4c4e0c5def3af0808635d765b4
Last active July 26, 2019 18:59
Conversion exit to replace ALV cell with icon code
* Underlined cells change to buttons else hide column.
IF <ls_field_catalog>-style = alv_style_font_underlined.
<ls_field_catalog>-style = cl_gui_alv_grid=>mc_style_button.
<ls_field_catalog>-convexit = 'Z2BTN'. "Conversion exit changes text to icon code.
<ls_field_catalog>-icon = abap_true. "Tells ALV display code as icon.
ELSEIF <ls_field_catalog>-style = cl_gui_alv_grid=>mc_style_button.
<ls_field_catalog>-style = alv_style_font_underlined.
<ls_field_catalog>-convexit = ''.
<ls_field_catalog>-icon = abap_false.
@Ripley6811
Ripley6811 / sel_screen.abap
Created March 7, 2018 21:56
ABAP: Sample selection screen
SELECTION-SCREEN BEGIN OF SCREEN 0001 AS SUBSCREEN.
DATA: sel_fname TYPE zaif_filename,
sel_werks TYPE werks_d,
sel_vkgrp TYPE vkgrp,
sel_kunnr TYPE char5,
* sel_kunnr TYPE kunnr,
sel_zsdate TYPE zsdate.
SELECT-OPTIONS s_fname FOR sel_fname.
@Ripley6811
Ripley6811 / get_msgguid.abap
Last active March 7, 2018 21:24
ABAP: How to get the GUID for an inbound file.
* Get the originating file GUID.
DATA: lv_aif_msgguid TYPE /aif/sxmssmguid,
lo_exception TYPE REF TO cx_root.
TRY .
CALL FUNCTION '/AIF/FILE_GET_GLOBALS'
IMPORTING
ximsgguid = lv_aif_msgguid.
CATCH cx_uuid_error INTO lo_exception.
@Ripley6811
Ripley6811 / terminator.config
Last active August 28, 2017 03:14
Terminator settings - Yellow text on dark purple background - Monospace 12
[global_config]
title_hide_sizetext = True
title_transmit_bg_color = "#990098"
title_transmit_fg_color = "#d2ffa8"
[keybindings]
[layouts]
[[default]]
[[[child1]]]
parent = window0
type = Terminal
@Ripley6811
Ripley6811 / pick_place_project.launch
Created August 10, 2017 10:57
Test world number set in the first arg line.
<launch>
<!--TODO:Change the test number based on the scene you want loaded-->
<arg name="test_scene_num" value="1"/>
<!--Include description and control launch files-->
<include file="$(find pr2_robot)/launch/robot_description.launch"/>
<include file="$(find pr2_robot)/launch/robot_control.launch"/>
<include file="$(find pr2_moveit)/launch/move_group.launch"/>
<rosparam command="load" file="$(find pr2_moveit)/config/grasp.yaml"/>
@Ripley6811
Ripley6811 / FontAwesome.js
Created July 29, 2016 04:59
React component generator for Font Awesome icons
import React from 'react';
/**
* Creates a react element for a Font Awesome icon.
*
* ```
* import FontAwesome from './FontAwesome';
* var FA_SPINNING_COG = FontAwesome("cog", "fa-spin");
* ```
@Ripley6811
Ripley6811 / react_class_patterns.jsx
Last active July 29, 2016 05:01
Various ways to organize React components/classes and suggestions on choosing
/**
* @overview This is a reference for the different ways to create components.
* Includes notes on when to use the different variations.
*/
/** non-class expression. (NOT "hoisted")
*
*/
const MyComponent = React.createClass({
@Ripley6811
Ripley6811 / TextureAtlasExercise.java
Created January 11, 2016 14:52
Exercise 2.1.08 alternative using "createSprite". Notice that using the Sprite's draw method does a better job than SpriteBatch's draw with scaling.
package com.udacity.gamedev.textureatlas;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.assets.AssetDescriptor;
import com.badlogic.gdx.assets.AssetErrorListener;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.g2d.Animation;
import com.badlogic.gdx.graphics.g2d.Sprite;
@Ripley6811
Ripley6811 / active_row_highlighting.html
Last active September 2, 2015 06:57
How to highlight a HTML table row when it gets focus by clicking any sub-element.
...
<!-- KnockoutJS used to iterate over products list -->
<tbody data-bind="foreach: products">
<tr onclick="highlightRow(this)">
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
</tbody>
...
@Ripley6811
Ripley6811 / tkinter_canvas_save.py
Created August 28, 2015 09:02
Ssaving an animation done on Tkinter canvas as a series of jpeg images
from Tkinter import *
from PIL import ImageGrab
from numpy import array
import os
"""
Canvas only has a postscript save option. Using a frameless canvas
tucked into a corner and PIL's ImageGrab, an image or animated series
can be saved easily as *.jpg or other PIL format. I then use
ImageMagick to create an animated GIF from the series.