Skip to content

Instantly share code, notes, and snippets.

@fabriciocolombo
fabriciocolombo / responsiveTable.js
Created January 5, 2018 10:21 — forked from jasonphillips/responsiveTable.js
React table elements with automatic pivoting to list-style view for mobile
import React from 'react';
/* context helpers from:
* https://gist.github.com/ryanflorence/1e1290571337ebcea1c5a748e8f5b37d
*/
import provideContext from './provideContext';
import withContext from './withContext';
const contextShape = React.PropTypes.shape({
<?xml version="1.0" encoding="UTF-8"?>
<file>
<unit class="" column="0" line="1" method="" package="">
unit
<EmptyProcs class="" column="5" line="1" method="" package="">EmptyProcs</EmptyProcs>
</unit>
<interface class="" column="0" line="3" method="" package="">
interface
<type class="" column="0" line="5" method="" package="">
type
/*
https://jsfiddle.net/kuvmy7sa/1/
*/
var Table = React.createClass({
render: function() {
return <div className="table-responsive">
<table className="table table-striped">
{this.props.children}
</table>
</div>
@fabriciocolombo
fabriciocolombo / gist:4236ce010787d86b5c65
Last active May 8, 2023 18:30
Delphi 2010 Parse Json using DBXJson
uses DBXJSON, Character;
TJsonObjectHelper = class helper for TJsonObject
public
//Helper to find a JSON pair based on the pair string part
function Get(const PairName: UnicodeString): TJSONPair; overload;
end;
{ TJsonObjectHelper }
@fabriciocolombo
fabriciocolombo / gist:2baa803f92207811d28d
Created November 10, 2014 18:34
Spring XML MappingConverter
public final class MappingConverters {
private static class SelfDocClassAliasingMapper extends MapperWrapper {
public SelfDocClassAliasingMapper(Mapper wrapped) {
super(wrapped);
}
@SuppressWarnings("rawtypes")
@Override
program Project2;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
DbxJsonUnMarshal,
RestClient,
@fabriciocolombo
fabriciocolombo / gist:7121890
Created October 23, 2013 16:28
Trigger de Logon Oracle
CREATE OR REPLACE TRIGGER "LOGON_ON"
AFTER
LOGON
ON SCHEMA
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_DATE_FORMAT="MM/DD/YYYY"';
EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_NUMERIC_CHARACTERS=".,"';
EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_TIMESTAMP_FORMAT="MM/DD/YYYY HH24:MI:SSXFF"';
EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT="MM/DD/YYYY HH24:MI:SSXFF TZR"';
END;
Revert último commit
$ git commit ... //Commit equivocado
$ git reset --soft HEAD^ //Desfaz commit
Revert added file
$ git add [file]
$ git reset [file]
From http://www.cesarromero.com.br/script-para-baixar-atualizacoes-de-repositorios-subversion-mercurial-e-git
@echo off
::--------------------------------------------------------------------------
:: Copyright (c) 2012-2013, Cesar Romero
:: All rights reserved.
::
:: Code license Mozilla Public License 1.1
::
:: Redistribution and use in source and binary forms, with or without
@fabriciocolombo
fabriciocolombo / gist:4279304
Created December 13, 2012 20:00
Capturing console output with Delphi
//Anonymous procedure approach by Lars Fosdal
type
TArg<T> = reference to procedure(const Arg: T);
procedure TForm1.CaptureConsoleOutput(const ACommand, AParameters: String; CallBack: TArg<PAnsiChar>);
const
CReadBuffer = 2400;
var
saSecurity: TSecurityAttributes;
hRead: THandle;