Skip to content

Instantly share code, notes, and snippets.

View loraderon's full-sized avatar

Anders Wåglund loraderon

View GitHub Profile
@RealDotNetDave
RealDotNetDave / .editorConfig
Last active April 11, 2024 13:36
.editorConfig by David (dotNetDave) McCarter - dotNetTips.com
# dotNetDave's (David McCarter) Editor Config - dotNetTips.com
# Updates to this file are posted quarterly at: https://bit.ly/EditorConfig5
# Updated February 14, 2024
# dotNetDave's NEW coding standards book is available at: https://bit.ly/CodingStandards8
# Rockin' the Code World with dotNetDave (weekly live show): https://bit.ly/RockinCodeWorldShows
root = true
# All Files
[*]
using System;
using System.Linq;
using System.Net.Sockets;
using System.Threading.Tasks;
using Nito.AsyncEx;
using Raven.Client.Documents;
using System.Reactive.Linq;
using System.Threading;
using Raven.Client.Documents.Indexes;
using Raven.Client.Documents.Linq.Indexing;
@equinox2k
equinox2k / RoundCornersProcessor.cs
Last active October 9, 2019 06:36
RoundCornersProcessor for ImageSharp
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.Primitives;
using SixLabors.Shapes;
namespace EQL.ImageSharp
{
public static class RoundCornersProcessor
{
@equinox2k
equinox2k / SquircleProcessor.cs
Last active October 9, 2019 06:36
SquircleProcessor for ImageSharp
using System;
using System.Collections.Generic;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.Primitives;
using SixLabors.Shapes;
namespace EQL.ImageSharp
{
@simonmorley
simonmorley / gist:7224897
Last active June 4, 2017 16:44
Nginx configuration for a secure kibana, elasticsearch setup. Version 1, no way finished.
server {
listen 8443 default ssl;
server_name www.yourdomain.com;
ssl on;
ssl_certificate /etc/nginx/conf.d/cert.pem;
ssl_certificate_key /etc/nginx/conf.d/cert.key;
client_max_body_size 50M;
error_log /var/log/nginx/elasticsearch-errors.log;
@duydo
duydo / elasticsearch_best_practices.txt
Last active December 15, 2021 06:12
Elasticsearch - Index best practices from Shay Banon
If you want, I can try and help with pointers as to how to improve the indexing speed you get. Its quite easy to really increase it by using some simple guidelines, for example:
- Use create in the index API (assuming you can).
- Relax the real time aspect from 1 second to something a bit higher (index.engine.robin.refresh_interval).
- Increase the indexing buffer size (indices.memory.index_buffer_size), it defaults to the value 10% which is 10% of the heap.
- Increase the number of dirty operations that trigger automatic flush (so the translog won't get really big, even though its FS based) by setting index.translog.flush_threshold (defaults to 5000).
- Increase the memory allocated to elasticsearch node. By default its 1g.
- Start with a lower replica count (even 0), and then once the bulk loading is done, increate it to the value you want it to be using the update_settings API. This will improve things as possibly less shards will be allocated to each machine.
- Increase the number of machines you have so
@loraderon
loraderon / SelectButton.cs
Created September 15, 2010 08:16
SelectButton for WPF (similar to a SplitButton)
using System;
using System.Collections;
using System.Windows;
using System.Windows.Controls;
namespace loraderon.Controls
{
public partial class SelectButton : UserControl
{
public event RoutedEventHandler Click;
@redoPop
redoPop / .gitignore
Created June 18, 2010 22:08
Template .gitignore file for WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your