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
import urllib2 | |
import urlparse | |
import re | |
import argparse | |
REBOOT_URL = '/b/info/restart/?be=0&l0=1&l1=0&tid=RESTART' | |
BOX_URL = 'http://bebox.config/cgi' | |
def open_url(url, username, password): | |
passman = urllib2.HTTPPasswordMgrWithDefaultRealm() |
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
PROJECT = pigeonhol | |
LIB = lib/ | |
SRC = src/ | |
BUILD = build/ | |
OBJ = main.o observer.o | |
LIBS = inotify-cxx | |
CPP = g++ | |
CXXFLAGS = -Wall -ansi -pedantic-errors | |
all: $(OBJ) |
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
main = problem1 | |
problem1 = [i | i <- [1..1000], i `mod` 3 == 0 || i `mod` 5 == 0] |
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
main = do print(sumlist problem1) | |
problem1 = [i | i <- [1..1000], i `mod` 3 == 0 || i `mod` 5 == 0] | |
sumlist [] = 0 | |
sumlist (head:tail) = head + sumlist(tail) |
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
fibonacci = fibo 1 1 | |
fibo :: Int -> Int -> [Int] | |
fibo x y = x:(fibo x+y) |
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
// that's the condition interface; A condtion have just to be met | |
class Condition { | |
public: | |
virtual bool isMet(File&) const = 0; | |
}; | |
class FilenameEquals : public Condition | |
{ | |
FilenameEquals(string); | |
bool isMet(File&) const; |
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
// default ports | |
const data = require("self").data; | |
const panels = require("panel"); | |
const widgets = require("widget"); | |
exports.main = function(options, callbacks){ | |
// manage widget | |
var widget = widgets.Widget({ | |
id: "main", | |
label: 'Suggest!', |
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
const {Cc, Ci} = require("chrome"); | |
const self = require("self"); | |
exports.getPosition = getPosition; | |
/** | |
* Return the geolocation object | |
**/ | |
function getGeolocation(){ | |
return Cc["@mozilla.org/geolocation;1"] |
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
backlog = 2048 | |
daemon = False | |
debug = True | |
workers = 3 | |
logfile = "/usr/local/www/lolnet.org/reader/reader.gunicorn.log" | |
loglevel = "info" | |
bind = "unix:/usr/local/www/lolnet.org/reader/reader.gunicorn.sock" |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- # | |
import os, sys, argparse, string | |
from pelican import __version__ | |
TEMPLATES={ | |
'Makefile' : ''' | |
PELICAN=$pelican | |
PELICANOPTS=$pelicanopts |