This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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"); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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}; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Decorators | |
class ItemDecorator | |
def initialize(item) | |
@item = item | |
end | |
def status | |
if @item.sold? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// md5 | |
package br.com.clickjogos.utils; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
public class Md5 { | |
public Md5() {} | |
public String generate(final String s) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create file adb-hosts | |
192.168.0.133 adm.dev | |
192.168.0.133 api.clickjogos.dev | |
192.168.0.133 clickjogos.dev | |
192.168.0.133 connect.clickjogos.dev | |
192.168.0.133 devcenter.dev | |
192.168.0.133 jdm.dev | |
192.168.0.133 m.clickjogos.dev | |
192.168.0.133 sso_example.clickjogos.dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parseExpression(program) { | |
program = skipSpace(program); | |
var match, expr; | |
if (match = /^"([^"]*)"/.exec(program)) | |
expr = {type: "value", value: match[1]}; | |
else if (match = /^\d+\b/.exec(program)) | |
expr = {type: "value", value: Number(match[0])}; | |
else if (match = /^[^\s(),"]+/.exec(program)) | |
expr = {type: "word", name: match[0]}; | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
echo -e "$(tput setaf 2)** Executing Status command$(tput sgr0)" | |
git add . | |
echo -e "$(tput setaf 2)** Executing Status command$(tput sgr0)" | |
git commit --amend $1 | |
OlderNewer