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
char* json = "{\"coord\":{\"lon\":-0.13,\"lat\":51.51},\"sys\":{\"message\":0.0045,\"country\":\"GB\",\"sunrise\":1393397445,\"sunset\":1393436151},\"weather\":[{\"id\":802,\"main\":\"Clouds\",\"description\":\"scattered clouds\",\"icon\":\"03d\"}],\"base\":\"cmc stations\",\"main\":{\"temp\":283.27,\"pressure\":1014,\"humidity\":61,\"temp_min\":280.93,\"temp_max\":286.48},\"wind\":{\"speed\":5.7,\"deg\":270},\"clouds\":{\"all\":40},\"dt\":1393414204,\"id\":2643743,\"name\":\"London\",\"cod\":200}"; | |
JsonParser<80> parser; | |
JsonHashTable root = parser.parseHashTable(json); | |
Serial.print("City = "); | |
Serial.println(root.getString("name")); | |
Serial.print("Weather = "); |
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
find -name *.cs -exec dos2unix -A {} ; |
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
# /etc/logrotate.d/ghost | |
/var/log/ghost.log { | |
rotate 12 | |
monthly | |
compress | |
prerotate | |
service ghost stop | |
endscript | |
postrotate |
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 | |
OUTPUT=stats.csv | |
[ -f $OUTPUT ] || echo "date;sln;proj;cs;cpp" > $OUTPUT | |
count() { | |
git ls-tree -r --name-only $COMMIT | grep -e $1 | wc -l | sed 's/ //g' | |
} |
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 <JsonGenerator.h> | |
using namespace ArduinoJson::Generator; | |
void setup() | |
{ | |
Serial.begin(9600); | |
char sensor[] = "outdoor"; | |
float value = 25.6; |
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 <ArduinoJson.h> | |
using namespace ArduinoJson; | |
#define PRINT_VALUE(X) {Serial.print(#X" =\t");Serial.println(X);} | |
#define PRINT_SIZE(X) {Serial.print("sizeof("#X") =\t");Serial.println(sizeof(X));} | |
void setup() | |
{ | |
Serial.begin(9600); |
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
"C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-nm" --size-sort -C -r %1 | |
pause |
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 | |
# Converts a submodule to a subtree | |
PREFIX=$1 | |
set -euv | |
mkdir -p "/tmp/$PREFIX" | |
cp -R "$PREFIX" "/tmp/$PREFIX" | |
git rm $PREFIX |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\Setup\VC] | |
"ProductDir"="C:\\Users\\azuretools\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0" |
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/bash | |
set -eu | |
trap "tput sgr0" 0 | |
echo -n "Enter new TeamCity version: " | |
read VERSION | |
FILE=TeamCity-$VERSION.tar.gz |
OlderNewer