Skip to content

Instantly share code, notes, and snippets.

#include <langinfo.h>
#include <stdio.h>
int main(void)
{
char *codeset = nl_langinfo(CODESET);
printf("codeset: %s\n", codeset);
return 0;
}
/**
* Build using:
* gcc -o datetest gdatetimetest.c $(pkg-config --cflags --libs glib-2.0)
*/
#include <glib.h>
#include <locale.h>
int main(int argc, char *argv[])
{
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
#include <drm_fourcc.h>
#include <libkms.h>
#define LOG(...) \
#include <algorithm>
#include <iostream>
#include <iterator>
#include <string>
#include <vector>
#include <set>
#include <random>
#include <chrono>
std::vector<int> unique_vec(int min, int max, std::size_t n, std::mt19937& gen) {
/* linux-test.c generated by valac 0.30.0, the Vala compiler
* generated from linux-test.vala, do not modify */
#include <glib.h>
#include <glib-object.h>
#include <linux/if.h>
#include <stdio.h>
@bboozzoo
bboozzoo / bar.h
Last active March 8, 2016 20:19
vala missing header
#ifndef __BAR_H__
#define __BAR_H__
enum {
BAR_UP
};
#endif
package main
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/x509"
"encoding/pem"
"log"
"os"
@bboozzoo
bboozzoo / client.go
Last active June 27, 2016 10:06
Golang compressed HTTP cmpression unexpected EOF
package main
import (
"bytes"
"io/ioutil"
"log"
"net/http"
)
func main() {
@bboozzoo
bboozzoo / dnstest.go
Created September 19, 2016 18:13
DNS test
package main
import (
"flag"
"fmt"
"log"
"net"
"os"
"path/filepath"
"time"