Skip to content

Instantly share code, notes, and snippets.

View reuben's full-sized avatar
🌠

Reuben Morais reuben

🌠
View GitHub Profile
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
#
@reuben
reuben / test.c
Created May 26, 2015 01:32
monitoria clandestina
#include <stdio.h>
int primo(int n) {
for (int i = 2; i < n-1; ++i) {
if (n % i == 0) {
return 0;
}
}
return 1;
}
@reuben
reuben / geoserver.js
Last active January 4, 2016 17:59
geoserver.js
var http = require('http');
var server = http.createServer(function (request, response) {
console.log("Serving request");
response.writeHead(200, {
"Cache-Control": "no-cache",
"Content-Type": "application/x-javascript",
});
var json = {
status: "OK",
/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */
#include "AccessCheck.h"
#include "AtomList.h"
#include "ContactsBinding.h"
#include "EventHandlerBinding.h"
#include "EventTargetBinding.h"
#include "WrapperFactory.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/DOMCursor.h"
diff --git a/utils/Makefile b/utils/Makefile
index 9d4dc5c2..bb4be49 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -9,7 +9,7 @@
LEVEL = ..
PARALLEL_DIRS := FileCheck FileUpdate TableGen PerfectShuffle \
- count fpcmp llvm-lit not unittest
+ count fpcmp llvm-lit not
#if defined(WIN32)
#include <shellapi.h>
#elif defined(__APPLE__)
#include <Foundation/NSString.h>
#include <AppKit/NSWorkspace.h>
#else
#include <unistd.h>
#endif
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const DEBUG = true;
function debug(s) { dump("-*- ContactManager: " + s + "\n"); }
const Cc = Components.classes;
dictionary ContactFieldInitializer {
sequence<DOMString>? type;
DOMString? value;
};
[Constructor(sequence<DOMString> type, DOMString value, boolean pref),
JSImplementation="@mozilla.org/contactField;1"]
interface ContactField {
attribute any type;
attribute DOMString? value;
receiveMessage: function(aMessage) {
let msg = aMessage.json;
switch (aMessage.name) {
case "Contact:Changed":
// Fire oncontactchange event
if (DEBUG) debug("Contacts:ContactChanged: " + msg.contactID + ", " + msg.reason);
let event = new this._window.MozContactChangeEvent("contactchange", {
contactID: msg.contactID,
reason: msg.reason
dictionary ContactFindSortOptions {
DOMString sortBy;
DOMString sortOrder = "ascending";
};
dictionary ContactFindOptions : ContactFindSortOptions {
DOMString filterValue;
DOMString filterOp;
any filterBy; // e.g. ["givenName", "nickname"]
unsigned long filterLimit;