This file contains hidden or 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 bash | |
| make test | |
| code=$? | |
| if [ "$code" == "0" ]; then | |
| exit 0 | |
| fi | |
| echo -n "Not all tests pass. Commit (y/n): " |
This file contains hidden or 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
| /* | |
| * Requires mongo-glib from master and gobject-introspection. Run with gjs. | |
| */ | |
| let Mongo = imports.gi.Mongo; | |
| let MainLoop = imports.mainloop; | |
| let Server = new Mongo.Server(); | |
| /* Listen on 27017 */ | |
| Server.add_inet_port(27017, null, null); |
This file contains hidden or 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 "dropline-status-icon.h" | |
| G_DEFINE_TYPE(DroplineStatusIcon, dropline_status_icon, GTK_TYPE_STATUS_ICON) | |
| struct _DroplineStatusIconPrivate | |
| { | |
| /* | |
| * XXX: Put stuff you need during runtime here. | |
| */ | |
| gpointer dummy; |
This file contains hidden or 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
| static void | |
| OidToString4(const guint8 *id, /* IN */ | |
| gchar *idstr) /* OUT */ | |
| { | |
| static const guint16 hex[] = { | |
| #if G_BYTE_ORDER == G_BIG_ENDIAN | |
| 12336, 12337, 12338, 12339, 12340, 12341, 12342, 12343, 12344, 12345, 12385, 12386, 12387, 12388, 12389, 12390, 12592, 12593, 12594, 12595, 12596, 12597, 12598, 12599, 12600, 12601, 12641, 12642, 12643, 12644, 12645, 12646, 12848, 12849, 12850, 12851, 12852, 12853, 12854, 12855, 12856, 12857, 12897, 12898, 12899, 12900, 12901, 12902, 13104, 13105, 13106, 13107, 13108, 13109, 13110, 13111, 13112, 13113, 13153, 13154, 13155, 13156, 13157, 13158, 13360, 13361, 13362, 13363, 13364, 13365, 13366, 13367, 13368, 13369, 13409, 13410, 13411, 13412, 13413, 13414, 13616, 13617, 13618, 13619, 13620, 13621, 13622, 13623, 13624, 13625, 13665, 13666, 13667, 13668, 13669, 13670, 13872, 13873, 13874, 13875, 13876, 13877, 13878, 13879, 13880, 13881, 13921, 13922, 13923, 13924, 13925, 13926, 14128, 14129, 14130, 14131, 14132, 14133, 14134, 14135, 14136, 14137, 14 |
This file contains hidden or 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
| /* uber-pixring.c | |
| * | |
| * Copyright (C) 2012 Christian Hergert <chris@dronelabs.com> | |
| * | |
| * This file is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Lesser General Public | |
| * License as published by the Free Software Foundation; either | |
| * version 2.1 of the License, or (at your option) any later version. | |
| * | |
| * This file is distributed in the hope that it will be useful, |
This file contains hidden or 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 <gudev/gudev.h> | |
| #include <string.h> | |
| static gboolean | |
| looks_like_android (GUdevDevice *device) | |
| { | |
| const gchar *model; | |
| gboolean ret = FALSE; | |
| gchar *lower; |
This file contains hidden or 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 | |
| """ | |
| A sample Mongo server that handles enough of the commands to connect | |
| with the mongo shell. | |
| Requires: https://github.com/chergert/mongo-async-python-driver | |
| """ | |
| from collections import OrderedDict |
This file contains hidden or 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 <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <errno.h> | |
| #include <termios.h> | |
| int | |
| open_port (void) |
This file contains hidden or 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 | |
| # | |
| # This is an example showing that Mongo performs no UTF-8 validation on | |
| # documents inserted into your collection. This is unfortunate, in that if | |
| # you want that feature, you should juse use the binary type. | |
| # | |
| # If you perform a db.errors.find() it will look like the object was shorted | |
| # as there is a \0 in the the middle of a string. However, if you use | |
| # mongodump -h localhost -d test -c errors -o steamydump |
This file contains hidden or 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 | |
| """ | |
| A simple editor built for live editing in GLib'ish manner. | |
| """ | |
| from gi.repository import GLib | |
| from gi.repository import GObject | |
| from gi.repository import Gtk | |
| from gi.repository import GtkSource |