Skip to content

Instantly share code, notes, and snippets.

@jdmonty
jdmonty / Blah.jq
Created August 12, 2022 20:28 — forked from turbo/Blah.jq
[$github, $bitbucket]
| (flatten) as $all_projects
| ([$all_projects[] | select(.stats.languages != null).stats.languages | to_entries] | flatten) as $langstats
| (
[
$all_projects[]
| select(.stats.languages != null).stats.languages
| keys
]
| flatten
@jdmonty
jdmonty / ffmpeg-wrapper
Created March 2, 2022 19:13 — forked from BenjaminPoncet/ffmpeg-wrapper
Synology VideoStation ffmpeg wrapper with DTS, EAC3 and TrueHD support (Installation instructions in 1st comment)
#!/bin/bash
rev="12"
_log(){
echo "$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - $1" >> /tmp/ffmpeg.log
}
_log_para(){
echo "$1" | fold -w 120 | sed "s/^.*$/$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - = &/" >> /tmp/ffmpeg.log
Update-ExecutionPolicy -Policy RemoteSigned
$Boxstarter.RebootOk=$true # Allow reboots?
$Boxstarter.NoPassword=$false # Is this a machine with no login password?
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot
# Trust PSGallery
Get-PackageProvider -Name Nuget -ForceBootstrap
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
# Temporary
@jdmonty
jdmonty / nginx.conf
Created February 17, 2018 04:56 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
https://github.com/alrra/dotfiles
https://github.com/caarlos0/dotfiles
https://github.com/mathiasbynens/dotfiles
https://github.com/paulirish/dotfiles
https://github.com/paulmillr/dotfiles/
https://github.com/holman/dotfiles
https://github.com/nikitavoloboev/dotfiles
https://github.com/nicksp/dotfiles
https://github.com/rkalis/dotfiles
https://github.com/driesvints/dotfiles
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Reactive.Linq;
using System.Text;
using System.Threading;
@jdmonty
jdmonty / find_and_replace_file_name_char.sh
Created October 3, 2016 13:12
CLI: find and replace on win w/ msysgit *nix tools (find)
find ./ -depth -name '*+*' -execdir bash -c 'mv "$1" "${1//+/-}"' _ {} ;
// from: https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/Text/StringBuilderCache.cs
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
/*============================================================
**
**
** Purpose: provide a cached reusable instance of stringbuilder
** per thread it's an optimisation that reduces the
@jdmonty
jdmonty / Test.cs
Last active August 29, 2015 14:21 — forked from jchannon/Test.cs
public class SomeFixture : IDisposable
{
private DockerClient client;
public SomeFixture()
{
Console.WriteLine("SomeFixture ctor: This should only be run once");
//Using https://github.com/ahmetalpbalkan/Docker.DotNet
using System;
using System.IO;
using MonoTouch.Foundation;
using MonoTouch.AVFoundation;
using MonoTouch.CoreMedia;
namespace TestProject.Common
{
public class AudioTrim
{