Skip to content

Instantly share code, notes, and snippets.

View aroman's full-sized avatar
👋
hiring!

Avi Romanoff aroman

👋
hiring!
View GitHub Profile
// usage: node demo.js OR node demo.js <number>
var graph = require('fbgraph')
graph.setAccessToken('<get one here https://developers.facebook.com/tools/explorer>');
graph.setGraphVersion('2.0');
function explode (err) {
console.error(err);
process.exit(1);
};
package main
import (
"fmt"
netUrl "net/url"
fb "github.com/huandu/facebook"
)
const ACCESS_TOKEN = "<get one here https://developers.facebook.com/tools/explorer>"
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>')
~/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.
~ $ 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.
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
@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)
}
@aroman
aroman / iso-to-usb.md
Last active June 18, 2017 01:52
Creating a Mac-bootable USB drive from an elementary OS ISO

How to turn an Isis ISO into USB installation media

Using the command line

  1. Download the ISO. Let's assume it's in ~/Downloads.
  2. Convert the ISO to DMG format: hdiutil convert -format UDRW -o isis elementaryos-unstable-amd64.20140529.iso.
  3. Insert your >1GB USB drive into your Mac.
  4. Determine and make note of the mount point of your USB drive.

Using Disk Utility

~ $ 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
<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