Skip to content

Instantly share code, notes, and snippets.

View DannySotzny's full-sized avatar

Danny Sotzny DannySotzny

View GitHub Profile
*
!.gitignore
@DannySotzny
DannySotzny / SetPanoExif Droplet.bat
Last active June 27, 2016 20:41
Set Make and Modell to Ricoh Theta S to upload panoram to Facebook as Panorama Picture
@echo off
title Set Exif Data
echo SET EXIF DATA FOR FACEBOOK PANORAMA droplet
IF "%~1" == "" GOTO ERROR
IF NOT EXIST "%~1" GOTO ERROR
FOR %%V in (%*) do "%~dp0\exiftool" -Make="RICOH" -Model="RICOH THETA S" "%%~V"
GOTO DONE
@DannySotzny
DannySotzny / gdrive_init.cs
Created March 18, 2016 14:29
Init GDRIVE
public void InitService()
{
UserCredential credential;
using (var stream =
new FileStream("client_id.json", FileMode.Open, FileAccess.Read))
{
string credPath = Environment.GetFolderPath(
Environment.SpecialFolder.Personal);
credPath = Path.Combine(credPath, ".credentials/drive-dotnet-quickstart.json");
@DannySotzny
DannySotzny / AutomaticDecompressionWebClient.cs
Created January 27, 2016 10:46
C#: Enable Automatic Decompression on System.Net.WebClient
public class AutomaticDecompressionWebClient : WebClient
{
protected override WebRequest GetWebRequest(Uri address)
{
var request = base.GetWebRequest(address) as HttpWebRequest;
if (request == null) throw new InvalidOperationException("You cannot use this WebClient implementation with an address that is not an http uri.");
request.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip;
return request;
}
}
@DannySotzny
DannySotzny / cli.ini
Created January 22, 2016 09:48
Let´s Encrypt Configfile
# This is an example of the kind of things you can do in a configuration file.
# All flags used by the client can be configured here. Run Let's Encrypt with
# "--help" to learn more about the available options.
# Use a 4096 bit RSA key instead of 2048
rsa-key-size = 4096
# Cert-Authority to use
## TestingServer
# server = https://acme-staging.api.letsencrypt.org/directory