Skip to content

Instantly share code, notes, and snippets.

@jromero
jromero / custom_rules.xml
Created May 2, 2014 18:16
Ant build script xml for doing annotation preprocessing from Dagger. Port of https://github.com/excilys/androidannotations/wiki/Automating-the-Build-in-Jenkins-with-Ant
<?xml version="1.0" encoding="UTF-8"?>
<project name="******YOUR PROJECT NAME******" default="help">
<property name="apt_generated.dir" value="${basedir}/.apt_generated/" />
<target name="-pre-clean">
<delete dir="${apt_generated.dir}" verbose="${verbose}" />
<mkdir dir="${apt_generated.dir}" />
</target>
<target name="-pre-compile">
@jromero
jromero / build-concorde-osx-0_2.sh
Last active August 29, 2015 14:02
Updated Concorde TSP build script (http://www.tsp.gatech.edu/ no longer available)
#################
# Moved to https://github.com/jromero/tsp_art_tools
#################
{"error": "Deprecated: Use preview or live feed from ATC."}
@jromero
jromero / spoon.gradle
Created August 27, 2014 04:55
A basic spoon task for Gradle to assemble debug apk, test apk, and execute spoon runner. (For a more robust implementation take a look at: https://github.com/stanfy/spoon-gradle-plugin)
def spoonRunner = "libs-uitests/spoon-runner-1.1.1-jar-with-dependencies.jar"
task spoon (dependsOn: ['assembleDebug', 'assembleDebugTest']) << {
def rootDir = project.rootDir
def localProperties = new File(rootDir, "local.properties")
def sdkDir
if (localProperties.exists()) {
Properties properties = new Properties()
localProperties.withInputStream { instr ->
@jromero
jromero / NO NONSENSE BEERWARE LICENSE
Created October 11, 2014 18:39
Based on the poorly worded "THE BEER-WARE LICENSE" by Poul-Henning Kamp.
NO NONSENSE BEERWARE LICENSE
Version 1
You can do whatever you want with this stuff. If we meet some day, and
you think this stuff is worth it, you can buy me/us a beer in return.
// ==UserScript==
// @name BetterStashPullRequestList
// @namespace https://gist.github.com/
// @version 0.1
// @description Add filtering and row highlighting
// @author You
// @match http://YOUR_STASH/projects/PROJECT/repos/REPO/pull-requests
// @grant none
// ==/UserScript==
@jromero
jromero / oracle_foreign_keys.sql
Created June 27, 2018 14:52
Enable / Disable Foreign Key Constraints in Oracle
DECLARE
/* The name of the schema that should be synchronized. */
SCHEMA_NAME_ VARCHAR2(4000) := 'YOUR_SCHEMA';
/* The operation type: */
/* ON — enable foreign keys. */
/* OFF — disable foreign keys. */
OPERATION_ VARCHAR2(4000) := 'OFF';
PROCEDURE CONSTRAINTS_ON_OFF(TARGET_SCHEMA_ IN VARCHAR2, ACTION_ IN VARCHAR2 := '')
@jromero
jromero / slideshow.html
Created October 17, 2018 18:33
Single page reveal.js sample
<!doctype html>
<html>
<head>
<!-- CDN: https://www.jsdelivr.com/package/npm/reveal.js -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>reveal.js</title>
@jromero
jromero / main.dart
Last active December 11, 2018 15:32
SO: 53723294 repro
import 'package:flutter/material.dart';
import 'package:virgil/virgil.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
@jromero
jromero / setup_nano_node.sh
Created July 4, 2019 16:00
Setup nano node on Centos 7
# 1. add repo
sudo yum-config-manager --add-repo https://repo.nano.org/nanocurrency.repo
# 2. install
sudo yum install nanocurrency
# 3. start
sudo systemctl start nanocurrency
# 4. enable rpc - set "rpc_enable" to "true"