Skip to content

Instantly share code, notes, and snippets.

View Swimburger's full-sized avatar
🍔
Creating full snack content

Niels Swimberghe Swimburger

🍔
Creating full snack content
View GitHub Profile
@doha99-eh
doha99-eh / ubuntu-dock-icons-center.md
Created November 14, 2021 01:24
Make Ubuntu dock icons centered

To bring dock to the bottom

$ gsettings set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM

To bring dock to the center

$ gsettings set org.gnome.shell.extensions.dash-to-dock extend-height false

copy from https://askubuntu.com/a/1366908/1426831

@dend
dend / toast.ps1
Last active April 2, 2024 14:50
Toast Notification in PowerShell
function Show-Notification {
[cmdletbinding()]
Param (
[string]
$ToastTitle,
[string]
[parameter(ValueFromPipeline)]
$ToastText
)
@danieldogeanu
danieldogeanu / MakePowerShellRememberSSHPassphrase.md
Last active April 18, 2024 08:13
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
open Microsoft.AspNetCore.Hosting
open Microsoft.Extensions.Hosting
open Giraffe
let webApp = GET >=> route "/" >=> text "Hello world"
[<EntryPoint>]
let main args =
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(fun webBuilder ->
@davidfowl
davidfowl / Program.cs
Last active December 26, 2021 00:27
A minimal fully asynchronous C# ASP.NET Core 3.0 application with routing (learn more about ASP.NET Core here https://docs.microsoft.com/en-us/aspnet/core/?view=aspnetcore-3.0)
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Hosting;
public class Program
{
public static void Main(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
@cocowalla
cocowalla / Debouncer.cs
Last active July 7, 2022 13:49
Simple debounce
using System;
using System.Threading;
using System.Threading.Tasks;
namespace MyNamespace
{
public class Debouncer : IDisposable
{
private readonly CancellationTokenSource cts = new CancellationTokenSource();
private readonly TimeSpan waitTime;
@HoldOffHunger
HoldOffHunger / bradvin.social.share.urls.txt
Last active April 18, 2024 13:41
Social Share URL's (Summary)
https://www.facebook.com/sharer.php?u={url}
https://www.facebook.com/dialog/share?app_id={app_id}&display={page_type}&href={url}&redirect_uri={redirect_url}
https://reddit.com/submit?url={url}&title={title}
https://twitter.com/intent/tweet?url={url}&text={title}&via={user_id}&hashtags={hash_tags}
https://www.linkedin.com/sharing/share-offsite/?url={url}
https://api.whatsapp.com/send?phone={phone_number}&text={title}%20{url}
https://www.tumblr.com/widgets/share/tool?canonicalUrl={url}&title={title}&caption={text}&tags={hash_tags}
http://pinterest.com/pin/create/button/?url={url}
https://www.blogger.com/blog-this.g?u={url}&n={title}&t={text}
https://www.evernote.com/clip.action?url={url}&title={title}
@CodingDoug
CodingDoug / README.md
Last active May 6, 2021 14:35
Building an assistant (chatbot) that translates languages, integrated with Slack
@sdurandeu
sdurandeu / gist:ed088d3f153b4e49e528
Created January 21, 2015 23:15
Powershell.exe Passing Array parameter
.\scriptParam.ps1
-----------------
Param (
[array] $myArray
)
foreach($foo in $myArray)
{
Write-Host "Value $foo"
}
@meziantou
meziantou / WebFormsBootstrapValidation.aspx
Last active May 27, 2023 11:29
ASP.NET WebForms Validators & Bootstrap
<%@ Page Language="C#" AutoEventWireup="true" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>ASP.NET WebForms Validators & Bootstrap</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css" />