Skip to content

Instantly share code, notes, and snippets.

If you have a column named Key then you will have issues when doing this:
select * from Sectors where Key = 'bagder'
"Incorrect syntax near the keyword 'Key'."
This is because Key is a reserved keyword in SQL. To resolve this, simply place the column name in square brackets e.g.
select * from Sectors where [Key] = 'bagder'
/**
* example C code using libcurl and json-c
*
* Requirements:
*
* json-c - https://github.com/json-c/json-c
* libcurl - http://curl.haxx.se/libcurl/c
*
* Build:
* Note that you will need to edit the code with your own HoD API key
/**
*
* Requirements:
*
* json-c - https://github.com/json-c/json-c
* libcurl - http://curl.haxx.se/libcurl/c
*
* On Ubuntu these are installed using:
* sudo apt-get install libjson-c-dev libcurl3
*
@dazzag24
dazzag24 / pydmesg
Created October 15, 2015 14:05 — forked from yongboy/pydmesg
#!/usr/bin/env python
# coding=utf8
# Copyright (C) 2010 Saúl ibarra Corretgé <[email protected]>
#
"""
pydmesg: dmesg with human-readable timestamps
"""
#!/usr/bin/env python
import time
import os
import RPi.GPIO as GPIO
import eeml
from eeml import CosmError
GPIO.setmode(GPIO.BCM)
DEBUG = 1
LOGGER = 1
@dazzag24
dazzag24 / Facewall.py
Created May 22, 2012 16:31 — forked from madzen/Facewall.py
Create an image grid from Facebook friend profile pictures
#!/usr/bin/python
###############################################################################
# Produce a collage (grid) of friend profile images from Facebook.
# Inspired by Vipin "swvist" Nair @ https://gist.github.com/2692786
###############################################################################
# Copyright (c) 2012 Madzen
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal