Skip to content

Instantly share code, notes, and snippets.

View NuckChorris's full-sized avatar

Emma Lejeck NuckChorris

View GitHub Profile
bars = {
:js => ['#FDD', '#F00'],
:html => ['#DFD', '#0F0'],
:css => ['#DDF', '#00F']
}
keys = bars.keys
test = (1..keys.length).map { |i|
keys.permutation(i)
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = 'pomf-raring'
config.vm.box_url = 'http://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-amd64-vagrant-disk1.box'
config.vm.network :forwarded_port, guest: 8010, host: 7890
config.vm.network :private_network, ip: "192.168.121.192"
FROM ubuntu:latest
MAINTAINER nuck
ENV DEBIAN_FRONTEND noninteractive
# Basic system
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list &&\
apt-get update &&\
dpkg-divert --local --rename --add /sbin/initctl &&\
ln -sf /bin/true /sbin/initctl &&\
// Default layout per byte: [00 11 22 33]
const DAY_SLOTS = 48;
const SLOT_BITS = 2;
const MAX_VALUE = Math.pow(2, SLOT_BITS) - 1;
const DAY_BYTES = Math.ceil(DAY_SLOTS * SLOT_BITS / 8);
const BYTE_SLOTS = 8 / SLOT_BITS;
if (SLOT_BITS > 8) throw new Error('Bits per slot must be less than 8');
var pg = require('pg.js');
var pgcfg = require('./config/pgsql.json');
var db = exports.db = new pg.Client(pgcfg);
db.connect(function (err) {
if (err) throw err;
console.log('Connected to postgres');
});

Standard Library Classes

String

The String class represents a series of 0 or more characters. Internally, they are stored in UTF-8. They may use any characters, including the NULL (\0) character.

String#length -> Integer

Returns the length of the string. In Act, this is the number of characters as an end user would see it: that is, combining diacriticals are considered the same character as the letter they combine with. The same concept applies to various other multibyte characters. The string is normalized according to Normalization Form C from the Unicode Consortium. This is the same algorithm used

-COMP_WORDBREAKS=
+CHOST=x86_64-unknown-linux-gnu
+COMMAND_MODE=legacy
+CPPFLAGS=-D_FORTIFY_SOURCE=2
+CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4
+MAKEFLAGS=-j4
-OLDPWD=/home/plejeck/Code/Undesktop/undesktop-ssh-askpass-1.0.0
+OLDPWD=/home/plejeck/Code/abs/extra/x11-ssh-askpass
-PWD=/home/plejeck/Code/Undesktop
+PWD=/home/plejeck/Code/abs/extra/x11-ssh-askpass/src
# Maintainer: Peter Lejeck <me@plejeck.com>
pkgname=undesktop-ssh-askpass
pkgver=0.1.0
pkgrel=0
pkgdesc='Undesktop project passphrase dialog for SSH'
url='http://plejeck.com/undesktop/askpass/'
license=('MIT')
arch=('i686' 'x86_64')
depends=('gtk3' 'glib2' 'cairo')

Undesktop

What is the Undesktop Project?

The Undesktop Project exists to help decouple desktop applications from the window manager. We work towards this by developing (or sponsoring the development of) high-quality, modern desktop applications which stand on their own.

What's the stack?

The applications use GTK3 for the GUI and are primarily programmed in Vala. Building is performed using CMake. Some applications use Clutter to enhance the experience, but usage is minimized to avoid being intolerably slow on systems without a GPU.

Settings Specification

Settings Host

The Settings Host ("Host") handles listing, displaying, launching, and managing communications to and from its Settings Panel ("Panel") subprocesses.

To retrieve the list of Panels, the Host goes down the thing and looks for Settings Panel Specification ("Spec") files. A Spec found in a directory lower down the list supersedes one with the same name found higher up the list.