#Logcat color configuration
Like leaving the log of the friendliest adb
-
Download file and install:
$ cd /tmp $ wget https://github.com/downloads/marshall/logcat-color/logcat-color-0.5.tar.gz
$ tar -vzxf logcat-color-0.5.tar.gz
# Decorators | |
class ItemDecorator | |
def initialize(item) | |
@item = item | |
end | |
def status | |
if @item.sold? |
#Logcat color configuration
Like leaving the log of the friendliest adb
Download file and install:
$ cd /tmp
$ wget https://github.com/downloads/marshall/logcat-color/logcat-color-0.5.tar.gz
$ tar -vzxf logcat-color-0.5.tar.gz
# config/initializer/inflections.rb => module customize API | |
ActiveSupport::Inflector.inflections(:en) do |inflect| | |
inflect.acronym 'API' | |
end | |
# hints for namespace and subdomains | |
# api.bar.com/foo/ | |
BarRails::Application.routes.draw do |
# maven install | |
mvn install:install-file -Dfile=libs/android-support-v4.jar -DgroupId=com.google.android -DartifactId=support-v4 -Dversion=r8 -Dpackaging=jar | |
mvn install | |
# maven run | |
mvn android:deploy | |
mvn android:run |
#!/bin/bash | |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
COMMIT_MESSAGE=$1 | |
echo -e "$(tput setaf 2)** Executing Status command$(tput sgr0)" | |
git status | |
echo -e "\n$(tput setaf 2)\n** Executing add command$(tput sgr0)" | |
git add . |
@mixin progress-value($pairs...) { | |
@each $pair in $pairs { | |
$value: nth($pairs, 1); | |
$color: nth($pairs, 2); | |
progress[value="#{$value}"] { | |
color: #{$color}; // For IE 10 progress bar | |
&::-webkit-progress-value { background-color: #{$color}; } | |
&::-moz-progress-bar { background-color: #{$color}; } |
var Db = require('mongodb').Db, | |
MongoClient = require('mongodb').MongoClient, | |
Server = require('mongodb').Server, | |
ReplSetServers = require('mongodb').ReplSetServers, | |
ObjectID = require('mongodb').ObjectID, | |
Binary = require('mongodb').Binary, | |
GridStore = require('mongodb').GridStore, | |
Code = require('mongodb').Code, | |
BSON = require('mongodb').pure().BSON, | |
assert = require('assert'); |
// elements views | |
Button buttonSend = (Button) rootView.findViewById(R.id.button_send); | |
buttonSend.setOnClickListener(new OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
System.out.println("others buttons send"); | |
} | |
}); |
// without callback | |
Array.prototype.eachSlice = function (size){ | |
this.arr = [] | |
for (var i = 0, l = this.length; i < l; i += size){ | |
this.arr.push(this.slice(i, i + size)) | |
} | |
return this.arr | |
}; | |
[1, 2, 3, 4, 5, 6].eachSlice(2) |
Array.prototype.toSentence = -> | |
wordsConnector = ', ' | |
lastWordConnector = ' e ' | |
sentence = undefined | |
switch @length | |
when 0 | |
sentence = '' | |
when 1 | |
sentence = @[0] |