Skip to content

Instantly share code, notes, and snippets.

@matbee-eth
matbee-eth / machine.js
Last active November 6, 2019 15:28
Generated by XState Viz: https://xstate.js.org/viz
View machine.js
const initialState = {
id: 'toggle',
initial: 'idle',
context: {
msg: ''
},
states: {
idle: {
on: {
DONE_AVAILABLE: "granted",
@matbee-eth
matbee-eth / machine.js
Created November 5, 2019 20:23
Generated by XState Viz: https://xstate.js.org/viz
View machine.js
const grantedState = {
id: 'granted',
type: 'final'
}
const deniedState = {
id: 'denied',
type: 'final'
}
@matbee-eth
matbee-eth / gist:6676010
Created September 23, 2013 19:55
syslog
View gist:6676010
Sep 23 12:08:04 hp rsyslogd: [origin software="rsyslogd" swVersion="5.8.6" x-pid="650" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Sep 23 12:08:04 hp anacron[677]: Job `cron.daily' terminated (mailing output)
Sep 23 12:08:04 hp anacron[677]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Sep 23 12:08:04 hp anacron[677]: Normal exit (1 job run)
Sep 23 12:08:15 hp avahi-daemon[733]: Invalid response packet from host fe80::b55a:e7ab:6339:cf81.
Sep 23 12:09:55 hp avahi-daemon[733]: Invalid response packet from host fe80::b55a:e7ab:6339:cf81.
Sep 23 12:11:34 hp avahi-daemon[733]: Invalid response packet from host fe80::b55a:e7ab:6339:cf81.
Sep 23 12:12:56 hp kernel: [ 8330.612171] CPU0: Package power limit notification (total events = 2631)
Sep 23 12:12:56 hp kernel: [ 8330.612176] CPU2: Package power limit notification (total events = 2634)
Sep 23 12:12:56 hp kernel: [ 8330.612180] CPU3: Package power limit notification (total events = 2630)
@matbee-eth
matbee-eth / gist:6676003
Created September 23, 2013 19:54
dmesg
View gist:6676003
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.2.0-53-generic (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #81-Ubuntu SMP Thu Aug 22 21:01:03 UTC 2013 (Ubuntu 3.2.0-53.81-generic 3.2.50)
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.2.0-53-generic root=UUID=3edc6101-c9cf-4801-9059-389e3464cc1c ro quiet splash
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009d400 (usable)
View gist:5091628
----
main.js
----
pageWorker = require("sdk/page-worker").Page({
contentURL: data.url("main-worker.html"),
contentScriptFile: [
data.url("js/jquery.min.js"),
data.url("main-worker.js")
]
});
View gist:5008601
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var enumy = wm.getEnumerator('navigator:browser');
var tabbrowser = enumy.getNext().gBrowser;
var browserTimeouts = {};
for (var index = 0; index <= tabbrowser.tabContainer.childNodes.length; index++) {
// Get the next tab
var currentTab = tabbrowser.tabContainer.childNodes[index];
if (!tabbrowser.browserid) {
View gist:0b3b5dbe59b9a19dd1d1
In file included from ../../webrtc/base/iosfilesystem.mm:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSPathUtilities.h:5:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:19:21: error: expected a type
- (id)copyWithZone:(nullable NSZone *)zone;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:25:28: error: expected a type
- (id)mutableCopyWithZone:(nullable NSZone *)zone;
^
/Applications/Xcode.app/Contents/Dev
View gist:2897414
root@DrSkippedFirstuseHPPre:/media/internal/developer# ipkg-opt install org.webosinternals.ubuntu-natty-chroot_11.04-9_arm.ipk
Installing org.webosinternals.ubuntu-natty-chroot (11.04-9) to root...
ipkg: write: No space left on device
Configuring org.webosinternals.ubuntu-natty-chroot
stop: (01746/712381591) Unknown job: org.webosinternals.ubuntu-natty-chroot
View gist:2886293
C:\Program Files (x86)\HP webOS\SDK\bin>palm-log org.webosinternals.tailor
retrieving logs for application org.webosinternals.tailor on device "roadrunner-
linux" {2503fd80ef7051c38ce8fe2539ea159a0e99399d} usb 55322
[20120606-22:52:16.057006] error: Uncaught SyntaxError: Unexpected token ;, app/
assistants/startup-assistant.js:27
[20120606-22:52:16.111541] error: The scene 'startup' could not be pushed becaus
e an exception occurred.
[20120606-22:52:16.113464] error: Error: require Failed: The scene assistant 'St
artupAssistant' is not defined. Did you remember to include it in sources.json?,
line undefined, file undefined