Skip to content

Instantly share code, notes, and snippets.

View nebrius's full-sized avatar

Bryan Hughes nebrius

View GitHub Profile
---
name: Titanium.UI
extends: Titanium.Module
methods:
- name: createListView
summary: creates a new instance of [View](Titanium.UI.ListView)
parameters:
- name: parameters
type: Dictionary<Titanium.UI.ListView>

Automatic runs (build/clean/etc)

Purpose: to find runtime errors and warnings, including warnings from things like ti-api-deprecation-finder Goals/Features:

  • Fast runs
  • Report errors and warnings only. No other information should be reported
    • This information will be reported in the "problems" tab in studio
  • Single profile/set of options for all runs Profile:
  • Options:

Comments on the Tizen Repository

General Comments

  • Run your code through JSHint. You have lots of mixed tabs and spaces, missing semicolons, trailing whitespace, undeclared variables, unused variables, etc. I use the following options:
{
	"curly": true,
	"noempty": true,
@nebrius
nebrius / gist:3ac46763c079c4fd8d2b
Last active August 29, 2015 14:07
The Lesser Known Features of ECMAScript 6 Code
<!--
The MIT License (MIT)
Copyright (c) 2014 Bryan Hughes <bryan@theoreticalideations.com> (http://theoreticalideations.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@nebrius
nebrius / gist:fe1c70742bf03f073afe
Created October 28, 2014 19:53
Open brace on next line w/ 1TBS
if (val === 'sdfdsfsdf' ||
val === 'sdfsdfsfsf' ||
val > 23423423 ||
val < 123
) {
// I like the open brace on a new line _only_ in this situation
// so that there's a clear distinction between the end of the
// multi-line conditional and the beginning of the code
}
@nebrius
nebrius / gist:05c643fc3bc8e5034e08
Created May 26, 2015 14:46
Node.js Hardware WG CoC proposal #1

This Code of Conduct is adapted from Rust's wonderful CoC.

  • We are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, disability, ethnicity, religion, or similar personal characteristic.
  • Please avoid using overtly sexual nicknames or other nicknames that might detract from a friendly, safe and welcoming environment for all.
  • Please be kind and courteous. There's no need to be mean or rude.
  • Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer.
  • Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.
  • We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behaviour. We interpret the term "harassment" as including the definition in the [Citizen Code of Conduct](http://
@nebrius
nebrius / gist:3333e09e2bddaf6865df
Last active August 29, 2015 14:21
Node.js Hardware WG CoC proposal #2

Code of Conduct

Purpose

The core of the NodeBots community is the people in it. Our primary goal is ensure this community is as inclusive to the largest number of people, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, gender identity and expression, sexual orientation, ability, physical appearance, body size, race, age, socioeconomic status, religion (or lack thereof), or other marginalized aspect of attendees.

This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.

We invite all those who participate in the Node.js Hardware Working Group to help us create safe and positive experiences for everyone.

@nebrius
nebrius / gist:b6323f0be26598266188
Last active August 29, 2015 14:22
Heya interface proposal
var heya = require('./lib/index.js');
var controller = new heya.WebKeyboard();
var bot = new heya.PawelBot({
leftServo: 'A0',
rightServo: 'A1'
});
/*
@nebrius
nebrius / gist:e5e443bd408cefcf5a35
Created October 15, 2015 18:21
Output of `npm install serialport@latest` in Node 4.2.0
-
> serialport@2.0.1 install /Users/bhughes/Downloads/temp/node_modules/serialport
> node-pre-gyp install --fallback-to-build
(node) child_process: options.customFds option is deprecated. Use options.stdio instead.
CXX(target) Release/obj.target/serialport/src/serialport.o
CXX(target) Release/obj.target/serialport/src/serialport_unix.o
../src/serialport_unix.cpp:695:20: warning: comparison of array 'device.locationId' not equal to a null pointer is always true [-Wtautological-pointer-compare]
if (device.locationId != NULL) {
~~~~~~~^~~~~~~~~~ ~~~~
@nebrius
nebrius / gist:e08bac93b17a4bbcc97d
Last active October 15, 2015 18:39
Output of `npm install git://github.com/jgautier/firmata.git` (updated)
-
> firmata@0.7.1-pre-2 postinstall /Users/bhughes/Downloads/temp/node_modules/firmata
> node scripts/postinstall
> serialport@2.0.1 install /Users/bhughes/Downloads/temp/node_modules/firmata/node_modules/serialport
> node-pre-gyp install --fallback-to-build
CXX(target) Release/obj.target/serialport/src/serialport.o