Skip to content

Instantly share code, notes, and snippets.

View ddieppa's full-sized avatar
🏠
Working from home

Daniel Dieppa ddieppa

🏠
Working from home
View GitHub Profile
@frazerh
frazerh / mac_osx_lion_haproxy_logging.txt
Created May 3, 2012 16:15
MACOSX LION HAProxy Logging
HA Proxy Logging on Lion
-------------------------
# To enable haproxy logging we need to change syslogd startup procedure to include its network listener.
# Backup syslogd start up file
sudo cp /System/Library/LaunchDaemons/com.apple.syslogd.plist /System/Library/LaunchDaemons/com.apple.syslogd.plist.bakup
# Convert binary file to xml to be human readable / editable
@nickytonline
nickytonline / tools-programs-for-osx.md
Last active May 12, 2021 19:58
Tools/Programs for devs on MacOS
  • Homebrew, run /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" from the command line to install it.
  • Homebrew Cask, run brew tap caskroom/cask from the command line to install it.
  • Alfred, buy the powerpack to get the full use of it.
  • Spectacle
  • Fish shell
  • VLC
  • Unarchiver
  • f.lux
  • n, run brew install n from the command line to install it.
  • Fisherman, run curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs https://git.io/fisher from the command line to install it.
@benmccallum
benmccallum / GraphQLSchemaTests.cs
Last active August 26, 2021 10:21
Verify your GraphQL schema changes
using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Testing;
using Snapshooter.Json;
using Xunit;
namespace MyCompany.MyService
{
public class GraphQLSchemaTests
: IClassFixture<WebApplicationFactory<Startup>>
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "shell",
"style": "plain",
@ddieppa
ddieppa / DownloadFromListUsingYoutubeDl.md
Last active February 24, 2022 18:49
Command to download videos from a list containing the urls to the videos using youtube-dl. Have to have installed youtube-dl, you can use chocolatey for that.

tu### Download from a list of files url usin Youtube-dl

choco install -y youtube-dl
choco install -y aria2
choco install -y ffmpeg

youtube-dl -v -i -c --add-metadata --write-info-json --write-all-thumbnails --embed-thumbnail -o "%(title)s.%(ext)s" --external-downloader aria2c --external-downloader-args "-x 16 -s 16" --download-archive _downloaded.txt -a {\\path\to\list.txt} --config-location PATH
@philippdolder
philippdolder / Setup-Windows-Defender-Exclusions-Rider.ps1
Created January 6, 2020 00:48
Windows Defender configuration for JetBrains Rider
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[string]
$RiderHome
)
function Update-WindowsDefenderForRider {
[CmdletBinding()]
param (
@ddieppa
ddieppa / How to zip dotnet projects.md
Last active November 22, 2022 21:57
How to zip dotnet projects

How to zip dotnet projects

Visual Studio project folders contains a lot of files that it generates each time you compile your project, so you don't need them when zipping the folder, what about if we could use .gitignore?

There are ways to do this :) lets check them down

Using 7Zip

Here is the link to 7zip if not installed

@dfontana
dfontana / CmderZSH.md
Last active March 12, 2023 21:45
My setup guide for installing Cgywin, Mintty, Cmder, and ZSH.

What's this?

Instructions to obtain ZSH on a windows environment, without the input funny business presented by some other attempted solutions.

The final result is ZSH running on a mintty terminal, emulated by cygwin, and being handled by the popular cmder.

Why is this here?

For the benefit of myself and others. I've already followed these instructions twice. It took me hours to figure all this out, maybe someone else can save a few.

What exactly is covered?

  • Installing and setting up cmder

IEnumerable

IEnumerable vs IReadOnlyList

That’s by the way also true for IEnumerable itself. This interface provides only the basic functionality for working with collections (really, just iterating through them), and so if your method requires more than that, also state that requirement up front. For example, if the only thing you need out of a collection is the capability to enumerate its elements, it’s fine to use IEnumerable:

public void SomeMethod(IEnumerable<string> collection)
{
    foreach (string element in collection)
@ryanhanwu
ryanhanwu / Brewfile
Last active July 19, 2023 05:22
New Mac Setup Script 2021
# Taps
tap 'homebrew/cask-fonts'
tap 'homebrew/cask-versions'
tap 'heroku/brew'
# Install CLI Tools
## Shell Utilities
brew 'coreutils'
brew 'findutils'
brew 'autojump'