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
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring" | |
xmlns:cxf="http://camel.apache.org/schema/cxf" xmlns:jaxws="http://cxf.apache.org/jaxws" | |
xmlns:security="http://www.springframework.org/schema/security" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/context |
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
volatile int rate[10]; // used to hold last ten IBI values | |
volatile unsigned long sampleCounter = 0; // used to determine pulse timing | |
volatile unsigned long lastBeatTime = 0; // used to find the inter beat interval | |
volatile int P =512; // used to find peak in pulse wave | |
volatile int T = 512; // used to find trough in pulse wave | |
volatile int thresh = 512; // used to find instant moment of heart beat | |
volatile int amp = 100; // used to hold amplitude of pulse waveform | |
volatile boolean firstBeat = true; // used to seed rate array so we startup with reasonable BPM | |
volatile boolean secondBeat = true; // used to seed rate array so we startup with reasonable BPM |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>de.kopis</groupId> | |
<artifactId>fitbit-cli-example</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<dependencies> | |
<dependency> | |
<groupId>com.fitbit</groupId> | |
<artifactId>fitbit4j</artifactId> |
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
@SuppressWarnings("unchecked") | |
protected void addError(String key, ActionErrors actionErrors, ActionError errorToAdd){ | |
if(StringUtils.isNotBlank(key) && actionErrors != null && errorToAdd != null){ | |
Iterator<ActionError> it = actionErrors.get(key); | |
boolean okToAdd = true; | |
//empty iterator returned where key not in action errors so no need for null check | |
while(it.hasNext()){ | |
ActionError error = it.next(); | |
if(StringUtils.equals(error.getKey(), errorToAdd.getKey())){ | |
okToAdd = false; |
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 | |
# | |
# Sanitizes all files in the given path | |
# and makes them lowercase too. | |
# | |
# param 1: source directory | |
# param 2: target directory | |
shopt -s extglob; |
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 bash | |
# expecting a list of files "trans_vlcsnap-000??.png" that I want to merge into | |
# file with all images transparently overlayed | |
# | |
# need to create transparent images first, but the transparency has to be exponential | |
# otherwise the single images will blend out too fast in the merged result | |
for i in $(seq 23 59); do | |
prev=$(( $i-1 )) |
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
<?php | |
require_once 'library/OAuthRequester.php'; | |
// get store | |
$dboptions = array('server' => 'server', 'username' => 'username', 'password' => 'password', 'database' => 'database'); | |
$store = OAuthStore::instance("MySQL", $dboptions); | |
$consumer_key = $_REQUEST['consumer_key']; | |
$oauth_token = $_REQUEST['oauth_token']; | |
$oauth_verifier = $_REQUEST['oauth_verifier']; |
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
import java.io.IOException; | |
import org.joda.time.LocalDate; | |
import com.fitbit.api.FitbitAPIException; | |
import com.fitbit.api.client.FitbitAPIEntityCache; | |
import com.fitbit.api.client.FitbitApiClientAgent; | |
import com.fitbit.api.client.FitbitApiCredentialsCache; | |
import com.fitbit.api.client.FitbitApiCredentialsCacheMapImpl; | |
import com.fitbit.api.client.FitbitApiEntityCacheMapImpl; |
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 'twitter' | |
require 'peach' | |
USERNAME = '' # put your twitter username here | |
Twitter.configure do |config| | |
config.consumer_key = YOUR_CONSUMER_KEY | |
config.consumer_secret = YOUR_CONSUMER_SECRET | |
config.oauth_token = YOUR_OAUTH_TOKEN | |
config.oauth_token_secret = YOUR_OAUTH_SECRET |
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 | |
OLDIFS=$IFS | |
IFS=$'\n' | |
echo "Starting gallery..." | |
DIRECTORIES=$(find -type d) | |
# loop over all subdirectories | |
for d in $DIRECTORIES | |
do | |
pushd $d |