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
#include <boost/test/minimal.hpp> | |
#include "state_machine.hpp" | |
#include <vector> | |
// define states | |
enum states_t { | |
init, | |
state_one, | |
state_two, |
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 'iron_mq' | |
$stdout.sync = true | |
def write_msg msg | |
puts "*"*10 | |
puts msg | |
puts "*"*10 |
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('vertx') | |
include Vertx | |
@server = HttpServer.new | |
@server.request_handler do | req | | |
premonition = [ |
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
def self.npv_item_for_security_id sec_id, swap_prices | |
npv_items = swap_prices.npv_items.select do |item| | |
item['symbol'].eql?(sec_id) | |
end | |
return nil if npv_items.empty? | |
npv_item = npv_items.last | |
npv_item = npv_item.as_document unless npv_item.is_a?(Hash) |
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
cp $HOME/.bash_profile $HOME/bash_profile.$(date +%Y%m%d.%s).backup | |
grep -q DUMMY_ACCOUNT= $HOME/.bash_profile || echo "export DUMMY_ACCOUNT=${DUMMY_ACCOUNT}" >> $HOME/.bash_profile | |
last_uid=$(dscl . -list /Users UniqueID | awk '$2 > 500 { print $2 }' | sort -ug | tail -n1) | |
unique_uid=`expr $last_uid + 1` | |
echo "Creating user $DUMMY_ACCOUNT with UID $unique_uid" | |
dscl . -create /Users/$DUMMY_ACCOUNT | |
dscl . -create /Users/$DUMMY_ACCOUNT UserShell /bin/bash | |
dscl . -create /Users/$DUMMY_ACCOUNT RealName 'dummy account' |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Runtime.InteropServices; | |
namespace MyCSharpApp | |
{ |
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
{ | |
"message_type" : "collaboration", | |
"collaboration_id" : "7483cac0-e22f-11e1-9b23-0800200c9a66", | |
"type" : "setup", | |
"version" : 0.1, | |
"task" : [{ | |
"worker_id" : "0b152bf0-e230-11e1-9b23-0800200c9a66", | |
"worker_type" : "spatial", | |
"task" : [ { | |
"worker_id" : "1b152bf0-e230-11e1-9b23-0800200c9a66", |
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 | |
limit=$2 | |
echo $1 | |
number=`ssh jam@${1} df -lah | awk '$1=="/dev/sda5"{print int($5)}'` | |
echo $number | |
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
{ renditions: [ | |
remoteUrl: get_encoded_asset_url( 'LOW' ), | |
type: 'VIDEO_FULL', | |
displayName: "#{get_file_basename}_LOW", | |
refid: "#{get_file_basename}_LOW", | |
videoDuration: -1, | |
size: 0, | |
encodingRate: 563000, | |
frameWidth: 640, | |
frameHeight: 360, |
OlderNewer