Skip to content

Instantly share code, notes, and snippets.

View MattBlack85's full-sized avatar
🦉
owly crap

Mattia Procopio MattBlack85

🦉
owly crap
  • Kraków
View GitHub Profile
#include <stdio.h>
#include <stddef.h>
void foo(char **p, size_t lol);
void bar(char **p, size_t *lol);
void bar(char **p, size_t *lol) {
char method[] = "GET";
size_t lol_size = 50;
#!/usr/bin/python
#
# The wiring for the LCD is as follows:
# 1 : GND
# 2 : 5V
# 3 : Contrast (0-5V)*
# 4 : RS (Register Select)
# 5 : R/W (Read Write) - GROUND THIS PIN
# 6 : Enable or Strobe
# 7 : Data Bit 0 - NOT USED
#include <dirent.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
int main(void) {
DIR *main_dir;
FILE *temp_file;
struct dirent *read_dir;
@MattBlack85
MattBlack85 / fields.py
Created April 28, 2015 13:17
DRF GeometryField
class GeometryExcpetion(Exception):
pass
class GeometryField(serializers.Field):
geom_type = None
def __init__(self, *args, **kwargs):
if not self.geom_type:
raise GeometryException('You must declare a `geom_type` attribute on your field'