Skip to content

Instantly share code, notes, and snippets.

View aroman's full-sized avatar
👋
hiring!

Avi Romanoff aroman

👋
hiring!
View GitHub Profile
@aroman
aroman / email.js
Created May 17, 2014 15:15
mocha + async test isolation
module.exports.send = function (template, model, recipient, subject, callback) {
async.waterfall([
function readTemplate (wf_callback) {
fs.readFile(path.join(__dirname, TEMPLATES_DIR, template), wf_callback);
},
function renderTemplate (data, wf_callback) {
wf_callback(null, data.toString());
},
[_LOG_LEVEL_DEBUG 08:54:29.417854] SearchManager.vala:215: Replace "private" with "public"
[_LOG_LEVEL_INFO 08:54:29.446488] SearchManager.vala:173: 13 occurrences found
[_LOG_LEVEL_DEBUG 08:54:29.851415] SearchManager.vala:215: Replace "private" with "public"
[_LOG_LEVEL_INFO 08:54:29.869035] SearchManager.vala:173: 12 occurrences found
[_LOG_LEVEL_INFO 08:54:30.392455] SearchManager.vala:173: 0 occurrences found
[_LOG_LEVEL_FATAL 08:54:30.611825] [GLib-GObject] g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[_LOG_LEVEL_FATAL 08:54:30.611909] Scratch will not function properly.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5b18297 in g_slice_alloc () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
<snip>
CC libgtkinspector_la-object-hierarchy.lo
CC libgtkinspector_la-prop-editor.lo
CC libgtkinspector_la-prop-list.lo
CC libgtkinspector_la-python-hooks.lo
CC libgtkinspector_la-python-shell.lo
CC libgtkinspector_la-resource-list.lo
CC libgtkinspector_la-resources.lo
CC libgtkinspector_la-signals-list.lo
CC libgtkinspector_la-size-groups.lo
~ $ xinput list-props bcm5974
Device 'bcm5974':
Device Enabled (135): 1
Coordinate Transformation Matrix (137): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (262): 1
Device Accel Constant Deceleration (263): 2.500000
Device Accel Adaptive Deceleration (264): 1.000000
Device Accel Velocity Scaling (265): 12.500000
Synaptics Edges (266): -3791, 4311, 423, 6027
Synaptics Finger (267): 70, 75, 0
@aroman
aroman / thiny.js
Last active August 29, 2015 14:02
// a library
{
"books": [
ObjectId(507c7f79bcf86cd7994f6cAB),
ObjectId(507c7f79bcf86cd7994s320e),
ObjectId(507c7f79bcf86cd7994s221e)
],
"name": "New York Public Library",
"_id": ObjectId(507c7f7921sa6cd7994s22LB)
}
avi@omega:~$ wingpanel -d
[_LOG_LEVEL_INFO 15:32:49.002149] Application.vala:153: Wingpanel version: 0.2.4
[_LOG_LEVEL_INFO 15:32:49.002246] Application.vala:155: Kernel version: 3.13.0-29-generic
[_LOG_LEVEL_DEBUG 15:32:49.050237] [Gtk] Connecting to session manager
[_LOG_LEVEL_DEBUG 15:32:49.052361] Settings.vala:158: Loading settings from schema 'org.pantheon.desktop.wingpanel'
[_LOG_LEVEL_DEBUG 15:32:49.058582] IndicatorFactory.vala:47: Blacklisted Indicators: ,libappmenu.so
[_LOG_LEVEL_DEBUG 15:32:49.058912] IndicatorFactory.vala:86: Loading Indicator Library: libapplication.so
[_LOG_LEVEL_DEBUG 15:32:49.060107] IndicatorFactory.vala:89: Loading Indicator File: com.canonical.indicator.bluetooth
[_LOG_LEVEL_DEBUG 15:32:49.060967] IndicatorFactory.vala:89: Loading Indicator File: com.canonical.indicator.datetime
[_LOG_LEVEL_DEBUG 15:32:49.061298] IndicatorFactory.vala:89: Loading Indicator File: com.canonical.indicator.messages
~ $ bash
avi@omega:~$ G_DEBUG=fatal_criticals gdb --args wingpanel -d
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
~/D/r/l/build $ ./wingpanel
[_LOG_LEVEL_INFO 16:10:38.102933] Application.vala:153: Wingpanel version: 0.2.4
[_LOG_LEVEL_INFO 16:10:38.103022] Application.vala:155: Kernel version: 3.13.0-29-generic
[_LOG_LEVEL_WARN 16:10:57.968749] [Gtk] gtk_menu_attach_to_widget(): menu already attached to WingpanelBackendIndicatorObjectEntry
[_LOG_LEVEL_FATAL 16:11:07.664155] [Gdk] gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
[_LOG_LEVEL_FATAL 16:11:07.664212] Wingpanel will not function properly.
[_LOG_LEVEL_FATAL 16:11:07.665397] [Gdk] gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
[_LOG_LEVEL_FATAL 16:11:07.665427] Wingpanel will not function properly.
require 'gitlab'
require 'octokit'
Gitlab.configure do |c|
c.endpoint = 'http://projects.elementaryos.org/api/v3' # API endpoint URL, default: ENV['GITLAB_API_ENDPOINT']
c.private_token = '<redacted>' # username for sudo mode, default: nil
end
gh = Octokit::Client.new(:access_token => '<redacted>')
package main
import (
"fmt"
netUrl "net/url"
fb "github.com/huandu/facebook"
)
const ACCESS_TOKEN = "<get one here https://developers.facebook.com/tools/explorer>"