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
final Lookup lookup = new Lookup("my-txt.example.com", Type.TXT); | |
lookup.setResolver(new SimpleResolver()); | |
lookup.setCache(null); | |
final Record[] records = lookup.run(); | |
if (lookup.getResult() == Lookup.SUCCESSFUL) { | |
final StringBuilder builder = new StringBuilder(); | |
for (Record record : records) { | |
final TXTRecord txt = (TXTRecord) record; | |
builder.delete(0, builder.length()); | |
for (@SuppressWarnings("unchecked") |
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
self.client = [[MQTTClient alloc]initWithClientId: @"iosapp" cleanSession:YES]; | |
self.client.username = @"sohta2@github"; | |
self.client.password = <パスワード>; | |
NSLog(@"publishToBroker!!!"); | |
NSLog(@"%@", gMQTTHost); | |
[self.client connectToHost:gMQTTHost completionHandler:^(NSUInteger code) { | |
NSLog(@"%lu", (unsigned long)code); | |
if(code == ConnectionAccepted) { | |
NSLog(@"connect accepted!"); |
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
#!/usr/bin/env ruby18 -wKU | |
require "#{ENV["TM_SUPPORT_PATH"]}/lib/escape" | |
require "#{ENV['TM_SUPPORT_PATH']}/lib/tm/save_current_document" | |
require "#{ENV["TM_SUPPORT_PATH"]}/lib/tm/executor" | |
TextMate.save_if_untitled('node') | |
TextMate::Executor.run(e_sh("node"), ENV['TM_FILEPATH'], :version_args => '-v', :version_regex => /(\w+ [\d.]+).*/) |
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/sh | |
ID_FILE_PATH=~/.ssh/id_boot2docker | |
B2D_PORT=2022 | |
NTP_SERVER=time.asia.apple.com | |
CMD="sudo ntpclient -s -h ${NTP_SERVER}" | |
ssh -i ${ID_FILE_PATH} -p ${B2D_PORT} -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" docker@localhost "${CMD}" |
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
input { | |
stdin { | |
type => "stdin-type" | |
} | |
file { | |
type => "syslog" | |
path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog" ] | |
start_position => "beginning" | |
} |
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
input { | |
stdin { | |
type => "stdin-type" | |
} | |
file { | |
type => "syslog" | |
path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog" ] | |
start_position => "beginning" | |
} |
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
scp -i ~/.ssh/id_boot2docker -P 2022 file-to-upload docker@localhost:~ |
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/sh | |
# a resolution to the eclipse hanging issue | |
# http://stackoverflow.com/questions/8972034/eclipse-hangs-on-loading-workbench | |
# modify here as you like. | |
ECLIPSE_WS=$HOME/Documents/workspace | |
rm -f $ECLIPSE_WS/.metadata/.lock | |
rm -f $ECLIPSE_WS/.metadata/.plugins/org.eclipse.core.resources/.snap |
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 | |
# Example: | |
# $ scons && ~/sound.sh | |
# $ mvn clean deploy && ~/sound.sh Basso | |
VOL=6 | |
SND=$1 | |
if [ -z $SND ]; then |
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
require 'time' | |
require 'base64' | |
require 'net/http' | |
require 'net/https' | |
require 'openssl' | |
require 'uri' | |
module Route53 | |
class Client |