Skip to content

Instantly share code, notes, and snippets.

@wolfg1969
wolfg1969 / launch-sql-power-architect.sh
Created January 16, 2013 07:17
use traditional method (java -cp) to launch the sql power architect, in this way the hive jdbc driver can work.
#!/bin/sh
cd ~/program/architect-1.0.6/
#java -jar architect.jar 2>&1 > /dev/null &
CLASS_PATH="$(echo lib/*.jar jdbc/*.jar | tr ' ' ':')"
java -cp ${CLASS_PATH}:architect.jar ca.sqlpower.architect.swingui.ArchitectFrame
#include <stdio.h>
#include <string.h> /* for strncpy */
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <net/if.h>
@wolfg1969
wolfg1969 / proxy-wrapper.sh
Created January 22, 2013 02:25
export GIT_PROXY_COMMAND="/usr/bin/proxy-wrapper.sh"
#!/bin/sh
nc -xlocalhost:3128 -X5 $*
@wolfg1969
wolfg1969 / pcd8544_rpi_ip.c
Last active November 11, 2020 11:49
show ip address A simple PCD8544 LCD (Nokia3310/5110) for Raspberry Pi for displaying some system informations. Makes use of WiringPI-library of Gordon Henderson (https://projects.drogon.net/raspberry-pi/wiringpi/)
/*
=================================================================================
Name : pcd8544_rpi.c
Version : 0.1
Copyright (C) 2012 by Andre Wussow, 2012, desk@binerry.de
Description :
A simple PCD8544 LCD (Nokia3310/5110) for Raspberry Pi for displaying some system informations.
Makes use of WiringPI-library of Gordon Henderson (https://projects.drogon.net/raspberry-pi/wiringpi/)
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netdb.h>
#include <ifaddrs.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char *argv[])
@wolfg1969
wolfg1969 / README.md
Last active December 15, 2023 08:06
python-gps sample codes, Raspberry Pi 4 + u-blox GPS module (uart)

Raspberry Pi 4 + u-blox GPS module (uart)

$ sudo apt-get update
$ sudo apt-get install gpsd gpsd-client python-gps

Enable the serial interface and disable serial login shell with raspi-config then reboot. Confirm /dev/ttyS0 exists

$ ls -l /dev/serial*
lrwxrwxrwx 1 root root 5 May 9 10:38 /dev/serial0 -&gt; ttyS0
Vagrant::Config.run do |config|
config.vm.box = "centos-63-x64"
config.vm.share_folder "PuppetFiles", "/etc/puppet/files", "./files"
config.vm.define :redis_server do |redis_server|
redis_server.vm.network :hostonly, "192.168.0.10"
redis_server.vm.provision :puppet do |puppet|
puppet.manifest_file = "redis_server_manifest.pp"
puppet.options = ["--fileserverconfig=/vagrant/fileserver.conf"]
@wolfg1969
wolfg1969 / gist:5098330
Created March 6, 2013 10:17
inline python code to get pentaho repo name from repositories.xml
python -c "import xml.dom.minidom; print xml.dom.minidom.parse('./.kettle/repositories.xml').getElementsByTagName('repository')[0].getElementsByTagName('name')[0].firstChild.nodeValue"
#!/bin/sh
pkg=$1
if [ "$pkg" = "" -o ! -e "$pkg" ]; then
echo "no package supplied" 1>&2
exit 1
fi
leadsize=96
o=`expr $leadsize + 8`
#!/usr/bin/python
import RPi.GPIO as GPIO
from time import sleep
class HD44780:
def __init__(self, pin_rs=7, pin_e=8, pins_db=[25, 24, 23, 18]):