Skip to content

Instantly share code, notes, and snippets.

View helllth's full-sized avatar

Thorsten Hell helllth

View GitHub Profile
@helllth
helllth / boxcar.sh
Created September 25, 2012 13:26
send messages via boxcar (using generic provider)
#subscribe
curl -d 'email=me@mail.com' http://boxcar.io/devices/providers/MH0S7xOFSwVLNvNhTpiC/notifications/subscribe
#send message
curl -d 'email=me@mail.com' \
-d '&notification[from_screen_name]=Hello' \
-d '&notification[message]=github:gist is great' \
http://boxcar.io/devices/providers/MH0S7xOFSwVLNvNhTpiC/notifications
@helllth
helllth / gist:3760726
Created September 21, 2012 10:04
better pull
git fetch
git diff --stat ...origin/dev
git merge origin/dev
@helllth
helllth / Migration_GUP_Unterhaltungsmassnahme.sql
Created September 13, 2012 15:14
1:n Migration GUP_Unterhaltungsmassnahme
--nach Umstellung der Klassen (ABF) müssen noch diese Anpassungen (sync) gemacht werden
BEGIN WORK;
-- Legt eine neue Sequenz mit dem Namen "gup_massnahmenbezug_seq" an und startet bei dem Wert "1".
CREATE SEQUENCE gup_massnahmenbezug_seq MINVALUE 1 START 1;
CREATE TABLE gup_massnahmenbezug( id INTEGER PRIMARY KEY DEFAULT nextval('gup_massnahmenbezug_seq'), ort VARCHAR(32) NULL );
COMMIT WORK;
-- Löscht die Spalte "gup_massnahmen_ufer_links" aus der Tabelle "gup_planungsabschnitt".
ALTER TABLE gup_planungsabschnitt DROP COLUMN gup_massnahmen_ufer_links;
-- Löscht die Spalte "gup_massnahmen_umfeld_links" aus der Tabelle "gup_planungsabschnitt".
ALTER TABLE gup_planungsabschnitt DROP COLUMN gup_massnahmen_umfeld_links;
@helllth
helllth / gist:1016767
Created June 9, 2011 13:53
query the index with an extended class list and derive the super objects from the children
with recursive derived_index(ocid,oid,acid,aid,depth) as (
select class_id,object_id,cast (null as int), cast (null as int),0
from GEOSUCHE where class_id in
(
with recursive derived_child(father,child,depth) as (
select father,father,0 from cs_class_hierarchy where father=183
union all
select ch.father,ch.child,dc.depth+1 from derived_child dc,cs_class_hierarchy ch where ch.father=dc.child)
select distinct father from derived_child limit 100