Instantly share code, notes, and snippets.

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') {
} else {
View response_api_sample
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:
# Semana 003 - Resumo

Reposição de peças


  • VZAN Action 36 furos


  • Pedivela Shimano Deore FC-M610


  • Sapata Shimano Alívio

Peças aero @

  • 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) {
for (var i = 0; i < document.styleSheets.length; 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/
<IfModule mod_passenger.c>
PassengerRoot /home/vagrant/.gems/gems/passenger-4.0.45
PassengerDefaultRuby /usr/bin/ruby2.1
# 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/
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