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
#!/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
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
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
#!/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
#!/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
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
// sinon-chrome (https://github.com/vitalets/sinon-chrome/blob/master/example/test/beforeeach.js) | |
var fs = require('fs'); | |
var page; | |
var beforeLoadFn; | |
beforeEach(function() { | |
page = require('webpage').create(); | |
/** | |
* evaluate a function in the page | |
* @param {function} func the function to evaluate |
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 securityToken = '<YOUR SECURITY TOKEN>'; | |
var username = '<YOUR USERNAME>'; | |
var password = '<YOUR PASSWORD>' + securityToken; | |
var consumerKey = '<YOUR CONSUMER KEY>'; | |
var consumerSecret = '<YOUR CONSUMER SECRET>'; | |
var tokenResponse = session.fetchUrlSync( | |
'https://login.salesforce.com/services/oauth2/token', { | |
method : 'POST', |
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
// Gets a MOAT instance. | |
var moat = require('moat'); | |
// Initializes a new context. | |
var context = moat.init(); | |
// Gets a session object. | |
var session = context.session; |
OlderNewer