This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() { | |
UBRR0H = 0; | |
UBRR0L = 52; | |
UCSR0B = _BV(TXEN0); | |
UCSR0C = _BV(USBS0) | _BV(UCSZ01); | |
stdout = &mystdout; | |
while(1) { | |
int x; | |
for (x = 1; x < 1024; x++) { | |
UBRR0L = x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var io = require('socket.io'); | |
var redis_options = {}; // read https://github.com/LearnBoost/socket.io/blob/master/lib/stores/redis.js | |
var store = new io.RedisStore(redis_options); | |
var server = io.listen(http_server,{store:store}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright (c) 2012, Broadcom Europe Ltd | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright | |
notice, this list of conditions and the following disclaimer in the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <assert.h> | |
#include <stdbool.h> | |
#include <v3d2.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema, ObjectId = Schema.ObjectId; | |
var secondLevel = new Schema({ | |
count:Number | |
}); | |
var topLevel = new Schema({ | |
list:[secondLevel] | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoose = require('mongoose'); | |
mongoose.Types.ObjectId.prototype.toProtobuf = function () { | |
return new Buffer(this.id,'binary'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
********* Start testing of TestCase ********* | |
Config: Using QTest library 4.8.5, Qt 4.8.5 | |
PASS : TestCase::initTestCase() | |
QDEBUG : TestCase::convert(201) 201 | |
QDEBUG : TestCase::convert(201.6) 201.6 | |
PASS : TestCase::convert() | |
PASS : TestCase::cleanupTestCase() | |
Totals: 3 passed, 0 failed, 0 skipped | |
********* Finished testing of TestCase ********* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib, config, pkgs, ... }: | |
{ | |
services = { | |
toxvpn.enable = true; | |
toxvpn.localip = "192.168.123.10"; | |
}; | |
imports = [ <nixpkgs/nixos/modules/profiles/all-hardware.nix> "/etc/nixos/toxvpn_module.nix" ]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib, config, pkgs, ... }: | |
let | |
commonPackages = with pkgs; [ wget screen vim nix-repl usbutils nox ]; | |
perArchConfig = if builtins.currentSystem == "armv6l-linux" then { | |
FS = { | |
"/nix/var/nix/profiles" = { device="/nix/var/nix/profiles.arm"; options="bind"; }; | |
}; | |
} else { | |
FS = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib, config, pkgs, ... }: | |
{ | |
nixpkgs.config = { | |
packageOverrides = pkgs: rec { | |
pixman = pkgs.stdenv.lib.overrideDerivation pkgs.pixman (oldAttrs: { | |
# bypass a gcc 4.9 bug | |
configureFlags = "--disable-arm-iwmmxt"; | |
}); | |
}; | |
}; |
OlderNewer