View JS flatten
// [[1,2,[3]],4] -> [1,2,3,4]
function flatten(a) {
let result = [];
function searchItemAndAdd(array) {
array.forEach((item) => {
if (typeof(item) === 'object') {
searchItemAndAdd(item);
} else {
View response_api_sample
[
{
"internalCustomerId":"1b2a773b-bdec-4d5a-b00d-5b7553d6df89",
"isNew":true,
"name":"Brightcom",
"customerId":8,
"containers":[
{
"containerId":"b4c28679-db58-458f-9809-b92a0cc12bcd",
"deploymentId":null,
View temp_npm_error
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@0.3.8
npm WARN dashbid-vpaid-js@1.1.0 No repository field.
npm WARN dashbid-vpaid-js@1.1.0 No license field.
npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.7.1
npm ERR! npm v3.6.0
npm ERR! path /projects/dashbid/imo_vpaid-html5/node_modules/nyc/node_modules/yargs/node_modules/window-size/cli.js
npm ERR! code ENOENT
View posts_androidinrio
# Resumo 01
## Autor: Luciano
Na semana 1 criamos exemplos de Toast Notification.
Segue o exemplo do código no github:
[Androidinrio/ForkinAndroidCatete/blob/master/src/com/todo/android/MainActivity.java#L28](Androidinrio/ForkinAndroidCatete/blob/master/src/com/todo/android/MainActivity.java#L28)
# Semana 003 - Resumo
View bike.md

Reposição de peças

Aro

  • VZAN Action 36 furos

Pedivela

  • Pedivela Shimano Deore FC-M610

Freio

  • Sapata Shimano Alívio
View hobby_king.md

Peças aero @ hobbyking.com

  • ESC part: Nylon XT60 Connectors Male/Female (5 pairs) GENUINE
  • ESC part: Gold Plated Spring Connector 3.5mm (10pair/20pc)
  • ESC: Hobby King 30A ESC 3A UBEC ou HobbyKing Red Brick 20A ESC
  • Servo: HKSCM9-5 Single Chip Digital Servo (5V) 10g / 1.4kg / 0.09s
  • Receiver: Hobby King 2.4Ghz Receiver 6Ch V2
  • Links:
    • Linkage Stopper D2.1mm (10sets)
    • Linkage Stopper M3x2xL11.2mm (10pcs/set)
View countCSSRules.js
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {
View apache_setup.txt
# Definitive solution for apache production setup!
LoadModule passenger_module /home/vagrant/.gems/gems/passenger-4.0.45/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/vagrant/.gems/gems/passenger-4.0.45
PassengerDefaultRuby /usr/bin/ruby2.1
</IfModule>
# Snippet for passenger module installed with sudo, but this is not needed
# LoadModule passenger_module /var/lib/gems/2.1.0/gems/passenger-4.0.45/buildout/apache2/mod_passenger.so
View no_prying_when_commiting.sh
#!/bin/sh
for FILE in `git diff-index --name-status HEAD -- | awk '{print $2}'`; do
if [ "echo $FILE | grep .rb" ]; then
if [ "grep 'binding.pry|debugger' $FILE" ]; then
echo "$FILE: pry or debugger call. Fix it before committing."
exit 1
fi
fi
done