Skip to content

Instantly share code, notes, and snippets.

View bblanchon's full-sized avatar
🌟
No more counting dollars we’ll be counting stars

Benoît Blanchon bblanchon

🌟
No more counting dollars we’ll be counting stars
View GitHub Profile
@bblanchon
bblanchon / GitExecutableFlag.sh
Last active August 8, 2023 13:53
Git: add executable flag to *.sh
find . -name '*.sh' | xargs git update-index --chmod=+x
@bblanchon
bblanchon / Dockerfile
Last active October 18, 2015 16:51
Dockerfile for Domoticz
# docker build -t bblanchon/domoticz .
# docker run --device /dev/ttyACM0 -p 80:8080 bblanchon/domoticz
FROM ubuntu:14.04
MAINTAINER bblanchon
# install dependencies
RUN apt-get update && \
apt-get install -y \
build-essential \
@bblanchon
bblanchon / ESP_asyncJSON.cpp
Created January 26, 2016 12:40 — forked from sticilface/ESP_asyncJSON.ino
demonstrates crash with large JSONs
/*
*
* Demonstrates crash using chuncked print and large Json
* Requires
* https://github.com/me-no-dev/ESPAsyncWebServer
* https://github.com/me-no-dev/ESPAsyncTCP
* https://github.com/bblanchon/ArduinoJson
*
* use curl to make request...
* http://ip/json -> Will make request and send results async... causes crash. Works if lines are removed from json.. see addJson function
@bblanchon
bblanchon / QuasardbDemoWithBinaryFormatter.cs
Created February 2, 2016 09:40
How to use quasardb in a C# program with the BinaryFormatter
using Quasardb;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
using System;
namespace QuasardbDemoWithBinaryFormatter
{
class Program
{
[Serializable]
@bblanchon
bblanchon / QuasardbDemoWithDataContractSerializer.cs
Created February 2, 2016 09:48
How to use quasardb in a C# program with the DataContractSerializer
using Quasardb;
using System.IO;
using System;
using System.Runtime.Serialization;
namespace QuasardbDemoWithDataContractSerializer
{
class Program
{
[Serializable]
@bblanchon
bblanchon / QuasardbDemoWithNewtonSoftJson.cs
Created February 2, 2016 10:04
How to use quasardb in a C# program with JSON.net
using Quasardb;
using System.IO;
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Bson;
namespace QuasardbDemoWithNewtonSoftJson
{
class Program
{
@bblanchon
bblanchon / settings.json
Created February 9, 2016 10:28
Sublime Text: Restore Quick Switch Project shortcut
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" }
@bblanchon
bblanchon / AzureArmResourceProvidersLatestVersion.ps1
Created May 2, 2016 12:16
Latest versions of all Azure ARM resource providers
Get-AzureRmResourceProvider |
Select ProviderNamespace -Expand ResourceTypes |
Sort-Object ProviderNamespace,ResourceTypeName |
Format-Table ProviderNamespace,ResourceTypeName,@{Name="LatestApiVersion";Expression={$_.ApiVersions[0]}}
@bblanchon
bblanchon / ListVmImages.ps1
Last active October 18, 2016 09:45
Azure: view all your VM Images
Get-AzureVMImage | where {$_.Category -eq "User"} | Select ImageName
@bblanchon
bblanchon / DeleteVmImages.ps1
Last active October 18, 2016 09:45
Azure: delete all your VM images
Get-AzureVMImage | where {$_.Category -eq "User"} | Remove-AzureVMImage