Skip to content

Instantly share code, notes, and snippets.

View PaluMacil's full-sized avatar

Dan Wolf PaluMacil

View GitHub Profile
@mohamedattahri
mohamedattahri / getgo.sh
Last active April 6, 2023 18:20
Upgrade a Go installation to the latest version
#!/usr/bin/env bash
# getgo helps you install any version of go, or simply upgrade
# to the latest.
#
# Go versions will be installed under "/usr/local/go/{VERSION}",
# and "/usr/local/go/latest" will always point to the latest
# version installed.
#
# Upgrade to the latest:
@benpate
benpate / template-fragments.go
Last active July 10, 2024 12:08
Demonstration of Template Fragments using the standard Go template library
package main
import (
"html/template"
"net/http"
"strconv"
)
/***********************
This is a simple demonstration of how to use the built-in template package in Go to implement
@gurjeet
gurjeet / _my_golang_script.go
Last active March 14, 2022 01:28
GoLang Scripting
//usr/bin/env true; go run `dirname $0`/*.go "$@"; exit $?
package main
import (
"errors"
"os"
)
// TODO: catch Panics and emit a clear message
func main() { os.Exit(mainWithExitCode()) }
@danieldogeanu
danieldogeanu / MakePowerShellRememberSSHPassphrase.md
Last active July 22, 2024 22:17
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
@zoilomora
zoilomora / README.md
Last active May 13, 2024 16:49
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

docker run \
-p 139:139 \
-p 445:445 \
-e TZ=CST6CDT \
-v /media/kingkong:/mount/kingkong \
-d \
--name samba \
--restart unless-stopped \
dperson/samba \
-s "kingkong;/mount/kingkong"

Configure By Example

Learn the power of ASP.NET Core's Startup.Configure method with examples.

What is the Configure(IApplicationBuilder app, IHostingEnvironment env) method?

The Configure method in Startup.cs is essentially a fundamental part of Microsoft's OWIN implementation Katana. To sum up what OWIN and Katana are:

@Shaltz
Shaltz / Linux on Asus c300m
Last active July 15, 2019 23:33
Linux on Asus c300m
Follow this instructions to get yout chromebook ready for installation
> http://www.matws.org/c300/
Install ubuntu 17.10
> If wifi not working, set the date and time following this instructions :
> https://www.garron.me/en/linux/set-time-date-timezone-ntp-linux-shell-gnome-command-line.html
> If trackpad not working
> open up the laptop, unplug the battery and the trackpad cables, plug them back in and reboot
> If sound not working
> install a 4.4 kernel, sound breaks starting at kernel 4.5
@leanderjanssen
leanderjanssen / registry-minio.md
Last active February 29, 2024 06:28
Docker Registry with Minio storage example

Running a docker registry with Minio S3 backend

Run minio in a container

docker run -d -p 9000:9000 --name minio minio/minio server /export

Use docker logs to retrieve access key and secret key from minio container

docker logs minio

Create config.yml for Docker Registry

This file will have to be mounted to /etc/docker/registry/config.yml

@bnolan
bnolan / container_sdl.cpp
Created April 15, 2017 06:10
SDL Container for litehtml
#include "container_sdl.h"
#define _USE_MATH_DEFINES
#include <math.h>
#include <iostream>
using namespace litehtml;
container_sdl::container_sdl(litehtml::context* html_context, SDL_Renderer* renderer){