Skip to content

Instantly share code, notes, and snippets.

View blalor's full-sized avatar

Brian Lalor blalor

View GitHub Profile
@blalor
blalor / gist:233851
Created November 13, 2009 14:08
PL/SQL development snippets
/*
View: USER_SOURCE
Source of stored objects accessible to the user
---+--------+----------------+-------------------------------------------------------+
# | column | type | remark |
---+--------+----------------+-------------------------------------------------------+
1 | NAME | VARCHAR2(30) | Name of the object |
2 | TYPE | VARCHAR2(12) | Type of the object: "TYPE", "TYPE BODY", "PROCEDURE", |
| | | "FUNCTION", |
| | | "PACKAGE", "PACKAGE BODY" or "JAVA SOURCE" |
@blalor
blalor / avr-size.sh
Created February 6, 2011 13:11
shows how much ram and program space is used by a compiled program
#!/bin/bash
# http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=792113#792113
# ".data+.bss+.noinit is the initial RAM allocation."
# AVR Memory Usage
# ----------------
# Device: atmega328p
#
# Program: 12580 bytes (38.4% Full)
@blalor
blalor / target_device_size.sh
Created February 9, 2011 19:51
attempts to determine the total amount of flash in a given device
#!/bin/bash
set -e
MCU="$1"
cat <<-'EOF' > foo.c
#include <avr/pgmspace.h>
unsigned char mydata[64][16] PROGMEM =
{
@blalor
blalor / HsqldbDAOImpl.java
Created February 15, 2011 16:08
Spring factory for Hsqldb URLs
import org.springframework.jdbc.core.simple.SimpleJdbcDaoSupport;
import org.springframework.jdbc.core.simple.ParameterizedRowMapper;
import org.springframework.dao.DataIntegrityViolationException;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import java.util.Date;
@blalor
blalor / echotest.c
Created September 15, 2011 01:40
ATtiny85 pin crosstalk?
#include "soft_serial.h"
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <stdio.h>
#include <stdbool.h>
static volatile uint8_t data_byte;
@blalor
blalor / gist:1371071
Created November 16, 2011 19:30
serving a (non-bare) git repo

on your computer

Make a note of your computer's IP address; your_ip.

Record the full path to your working copy, the parent of the .git directory; repo_path.

  1. cd <repo_path>
  2. touch .git/git-daemon-export-ok
@blalor
blalor / RaphaelPoint.js
Last active October 11, 2015 02:18
Polymaps + Raphaël
function RaphPoint(paper, lat, lon) {
var that = this;
that._paper = paper;
that._lat = lat;
that._lon = lon;
that._map = null; // provided via map()
that._el = that._paper.circle(0,0,5)
.attr("fill", "#223fa3")
@blalor
blalor / README.md
Created January 26, 2013 14:36
Vert.x assembly for Maven

This is sample configuration to help you build a Vert.x "mod" archive. Put mod.xml into your project as src/main/assembly/mod.xml and the include the maven-assembly-plugin plugin config in your pom.xml. Also create src/main/resources/mod.json. When you run mvn package you will get target/${artifactId}-${version}-mod.zip which will contain all of your dependencies in ${groupId}.${artifactId}-v${version}/lib and ${groupId}.${artifactId}-v${version}/mod.json. Your application code and resources will be in ${groupId}.${artifactId}-v${version}/lib/${artifactId}-${version}.jar.

@blalor
blalor / gist:5527096
Last active October 9, 2017 14:50
redhat → debian, arch rosetta stone
@blalor
blalor / make_debs.sh
Last active December 17, 2015 10:49
Creates Debian packages for whisper, carbon, graphite-web. sources: * https://github.com/jbraeuer/graphite-debs
#! /bin/bash
#
# requires: fpm, python-pip
# gem install fpm
# apt-get install python-pip
#
set -e