Skip to content

Instantly share code, notes, and snippets.

@donvito
donvito / main.go
Created October 6, 2018 15:45
Hash passwords using bcrypt library #golang
package main
import (
"fmt"
"log"
"golang.org/x/crypto/bcrypt"
)
func main() {
@styblope
styblope / docker-api-port.md
Last active July 14, 2024 08:29
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
stream {
log_format basic '$remote_addr [$time_local] '
'$protocol $status $bytes_sent $bytes_received '
'$session_time';
access_log /var/log/nginx/access.log basic;
error_log /var/log/nginx/error.log debug;
include /etc/nginx/stream.conf.d/*.conf;
@fpsampayo
fpsampayo / retropie_with_kodi.md
Last active November 29, 2023 17:26
Configurando RetroPie con Kodi
@joyrexus
joyrexus / README.md
Last active June 19, 2024 12:05 — forked from dergachev/GIF-Screencast-OSX.md
Create a GIF screencast

Convert a screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@mattetti
mattetti / multipart_upload.go
Last active July 18, 2024 17:31
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"
@jewelsea
jewelsea / LayerClick.java
Created January 23, 2013 01:50
Demonstrates the JavaFX node mouseTransparent and pickOnBounds properties.
import javafx.application.Application;
import javafx.beans.binding.Bindings;
import javafx.beans.value.*;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.scene.paint.Color;
import javafx.scene.shape.*;
import javafx.stage.Stage;
@quinn
quinn / applypatch-msg.sample
Created January 28, 2010 23:00
the default git hooks.
#!/bin/sh
#
# An example hook script to check the commit log message taken by
# applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit. The hook is
# allowed to edit the commit message file.
#
# To enable this hook, rename this file to "applypatch-msg".