- do something
- do another thing
This file contains hidden or 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
| class Test < ActiveRecord::Base | |
| attr_accessible :description, :name, :latitude, :longitude | |
| include Tire::Model::Search | |
| include Tire::Model::Callbacks | |
| index_name "test-app" | |
| tire do | |
| mapping do |
This file contains hidden or 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
| { | |
| "settings": { | |
| "analysis": { | |
| "analyzer": { | |
| "my_ngram_analyzer": { | |
| "tokenizer": "my_ngram_tokenizer", | |
| "filter": [ | |
| "lowercase" | |
| ], | |
| "type" : "custom" |
This file contains hidden or 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
| #include "DHT.h" | |
| #include <LiquidCrystal.h> | |
| #define DHTPIN 2 | |
| #define DHTTYPE DHT22 // DHT 22 (AM2302) | |
| DHT dht(DHTPIN, DHTTYPE); | |
| LiquidCrystal lcd(7, 8, 9, 10, 11, 12); | |
| void setup() { |
This file contains hidden or 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
| alias ij='open -a /Applications/IntelliJ\ IDEA\ 13.app/' | |
| alias grun='java org.antlr.v4.runtime.misc.TestRig' | |
| set -x CLASSPATH '.:/usr/local/Cellar/antlr/4.1/antlr-4.1-complete.jar:$CLASSPATH' | |
| set PATH ~/ansiweather/ $PATH | |
| set PATH /usr/include/ $PATH | |
| set -x JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home | |
| function fish_prompt | |
| set_color $fish_color_cwd |
NEXT
- FindDTOService and annotations for looking up DTOs associated with a specific data object.
This file contains hidden or 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
| import java.io.File; | |
| import java.io.FileInputStream; | |
| import java.io.FileOutputStream; | |
| import java.util.concurrent.ExecutionException; | |
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.Executors; | |
| import java.util.concurrent.Future; | |
| /** | |
| * Created by ericcobb on 7/15/14. |
This file contains hidden or 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
| package com.levelsbeyond; | |
| import java.util.Date; | |
| import java.util.concurrent.Callable; | |
| import java.util.concurrent.LinkedBlockingQueue; | |
| import java.util.concurrent.ThreadPoolExecutor; | |
| import java.util.concurrent.TimeUnit; | |
| /** | |
| * Thread Test |
This file contains hidden or 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
| import java.util.*; | |
| import java.util.concurrent.*; | |
| public class Sample { | |
| public static void main(String[] args) throws Exception { | |
| ExecutorService executorService = Executors.newFixedThreadPool(10); | |
| for(int i = 0; i < 10; i++) { | |
| final int index = i; | |
| executorService.submit(new Runnable() { |
This file contains hidden or 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
| # Watchdog | |
| #------------------------------------------------------------------------------ | |
| use_watchdog = on | |
| delegate_IP = '10.10.10.100' | |
| wd_hostname = '10.10.10.21' | |
| wd_port = 9000 | |
| ifconfig_path = '/usr/bin' | |
| arping_path = '/usr/bin' | |
| if_up_cmd = 'sudo ip addr add $_IP_$ dev eth0' | |
| if_down_cmd = 'sudo ip addr del $_IP_$ dev eth0' |
OlderNewer