Skip to content

Instantly share code, notes, and snippets.

View laduke's full-sized avatar

Travis LaDuke laduke

  • zerotier
  • California
View GitHub Profile
function MyModule() {
if(false === (this instanceof MyModule)) {
return new MyModule();
}
events.EventEmitter.call(this);
}
sys.inherits(MyModule, events.EventEmitter);
MyModule.prototype.some_states = {};
var util = require('util'),
events = require('events'),
sys = require('sys');
function MyModule() {
if(false === (this instanceof MyModule)) {
return new MyModule();
}
events.EventEmitter.call(this);
this.states = {"hello":"world"};
var util = require('util'),
events = require('events'),
sys = require('sys');
function MyModule() {
if(false === (this instanceof MyModule)) {
return new MyModule();
}
events.EventEmitter.call(this);
this.states = {"hello":"world"};
stuff = {
"foo" : {"hello":"world"},
"bar" : {"baz":"bat"}
}
};
20:56:33 T:3036112752 M:1077424128 INFO: Launching app: app://onion-news-networks/ (applaunch)
20:56:34 T:3036112752 M:1077366784 ERROR: (pthread_mutex_destroy(&m_mutex)): [XCriticalSection.cpp:84] 16
20:56:35 T:2884402032 M:1076822016 INFO: updating 's information in apps.xml20:56:35 T:3036112752 M:1076797440 INFO: updating onion-news-networks's information in apps.xml
20:56:35 T:3036112752 M:1076797440 ERROR: Control has invalid animation type (no condition or no type)
20:56:39 T:2966420336 M:1080438784 ERROR: SQLite: The database file is locked Query: update media_folders set strStatus='new', iDateStatus=1300766195 where strPath='/home/share/media/torrents/incomplete/An Introd
uction to Permaculture/Growing Mushrooms_/Let''s Grow Mushrooms!/'
20:56:39 T:2894068592 M:1080541184 ERROR: CFileCurl::CReadState::Open, didn't get any data from stream. HTTP CODE: 0
20:56:39 T:2929716080 M:1080541184 ERROR: CFileCurl::CReadState::Open, didn't get any dat
~/src/vendor/boxee-source/src
~/src/vendor/boxee-source/src/boxee-sources-0.9.23.15885/language ~/src/vendor/boxee-source/src
~/src/vendor/boxee-source/src
~/src/vendor/boxee-source/src/boxee-sources-0.9.23.15885/media ~/src/vendor/boxee-source/src
~/src/vendor/boxee-source/src
~/src/vendor/boxee-source/src/boxee-sources-0.9.23.15885/scripts ~/src/vendor/boxee-source/src
~/src/vendor/boxee-source/src
~/src/vendor/boxee-source/src/boxee-sources-0.9.23.15885/skin/boxee ~/src/vendor/boxee-source/src
~/src/vendor/boxee-source/src
~/src/vendor/boxee-source/src/boxee-sources-0.9.23.15885/system/python/local ~/src/vendor/boxee-source/src
18:16:06 T:2817252208 M:1201844224 ERROR: Unable to load /opt/boxee/system/players/dvdplayer/avcodec-52-i486-linux.so, reason: /opt/boxee/system/players/dvdplayer/avcodec-52-i486-linux.so: undefined symbol: vaCreateBuffer
18:16:06 T:2817252208 M:1201844224 ERROR: CDVDDemuxFFmpeg::Open - failed to load ffmpeg libraries
18:16:06 T:2817252208 M:1201844224 ERROR: OpenDemuxStream - Error creating demuxer
18:16:06 T:2817252208 M:1201844224 NOTICE: CDVDPlayer::OnExit()
18:16:06 T:2817252208 M:1201844224 NOTICE: CDVDPlayer::OnExit() deleting input stream
18:16:07 T:3035563888 M:1264680960 NOTICE: CDVDPlayer::CloseFile()
18:16:07 T:3035563888 M:1264680960 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
18:16:07 T:3035563888 M:1264680960 NOTICE: DVDPlayer: waiting for threads to exit
18:16:07 T:3035563888 M:1264680960 NOTICE: DVDPlayer: finished waiting
@laduke
laduke / plsync.sh
Last active December 16, 2015 18:09 — forked from mkaito/plsync.sh
#!/usr/bin/env zsh
# Takes all my playlists from ~/.mpd/playlists, fixes them up, and creates a
# folder for each, along with the music they reference.
# The sync stage requires an sshd server to run on your phone, as well as the rsync executable.
# - http://linux.wxs.ro/2011/08/05/rsync-your-android/
MPD_MUSIC_ROOT="${HOME}/Music" # Root of your MPD library
MPD_PLAYLIST_ROOT="${HOME}/.mpd/playlists" # MPD playlist folder

mix phoenix.new --no-ecto hello_phoenix

If I remember correctly, letting ecto in makes it look for postgres on the pi. Could probably easily set it up for sqlite?

cd hello_phoenix

cp ../nerves_examples/hello_network/Bakefile .

Add to server: true to config section in config/prod.exs and change http to a specific port (It didn't seem to work setting PORT env variable, but I only tried once. )

@laduke
laduke / maybeToFuture.js
Created August 17, 2017 16:52
Maybe to Future
// Courtesy https://gitter.im/sanctuary-js/sanctuary
// maybeToFuture :: a -> Maybe b -> Future a b
const maybeToFuture = S.curry2((x, maybe) =>
S.maybe(Future.reject(x), Future.of, maybe)
);
// Collapse a `Future String (Maybe Integer)` into a `Future String Integer`.
S.chain(maybeToFuture('parseInt: "XXX" does not represent an integer'),
Future.of(S.Nothing));