Skip to content

Instantly share code, notes, and snippets.

View nitrix's full-sized avatar

Alex Belanger nitrix

View GitHub Profile
if(isset($_GET['generate_xml'])) { ?>
<?xml version="1.0" encoding="UTF-8"?>
<timesheet xmlns="http://www.w3.org/ns/SMIL">
<?php
---------------------------
if(isset($_GET['generate_xml'])) {
echo '<?xml version="1.0" encoding="UTF-8"?>'; //here? echo?
?>
#include "Student.hpp"
#include <iostream>
Student::Student(int semesterHours, float gpa)
{
std::cout << "constructing student" << std::endl;
m_semesterHours = 0;
m_gpa = 0.0;
}
upstream backend {
server localhost:8001;
}
server {
listen 80;
server_name alexbelanger.com;
charset utf-8;
error_page 404 /404.html;
user http;
worker_processes 4;
events {
worker_connections 1024;
}
http {
include mime.types;
server_names_hash_bucket_size 64;
static const long hextable[] = {
['0'] = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
['A'] = 10, 11, 12, 13, 14, 15,
['a'] = 10, 11, 12, 13, 14, 15
};
/*
* Convert a hex string to its decimal number.
* Unlimited length.
* Won't produce negative values.
/* Preprocessor */
#define MY_FUNC(my_param) MY_PARAM##my_param
#define MY_PARAM_yes true
#define MY_PARAM_no false
/* Code */
bool test = MY_FUNC(yes);
typedef char c;
void foo()
{
struct c {c c;} c;
c: c.c = 'c';
printf( "%c\n", c.c);
}
/*
* This returns 0 under C99 and 1 under C89
* kate, Sun May 28 16:25:24 BST 2006
*/
int main(void) {
int a = 5, b = 0;
(void)(a //* */ b++
);
@nitrix
nitrix / cute.pgm
Created July 1, 2014 18:41
Cute PGM
P2
# CREATOR: GIMP PNM Filter Version 1.1
360 490
255
255
255
255
255
255
255
P2
# feep.pgm
24 7
15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 3 3 3 3 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 15 15 15 0
0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 15 0
0 3 3 3 0 0 0 7 7 7 0 0 0 11 11 11 0 0 0 15 15 15 15 0
0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 0 0
0 3 0 0 0 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 0 0 0 0