Skip to content

Instantly share code, notes, and snippets.

@dkeza
dkeza / dep.md
Created November 30, 2018 12:29 — forked from subfuzion/dep.md
Concise guide to golang/dep

Overview

This gist is based on the information available at golang/dep, only slightly more terse and annotated with a few notes and links primarily for my own personal benefit. It's public in case this information is helpful to anyone else as well.

I initially advocated Glide for my team and then, more recently, vndr. I've also taken the approach of exerting direct control over what goes into vendor/ in my Dockerfiles, and also work from isolated GOPATH environments on my system per project to ensure that dependencies are explicitly found under vendor/.

At the end of the day, vendoring (and committing vendor/) is about being in control of your dependencies and being able to achieve reproducible builds. While you can achieve this manually, things that are nice to have in a vendoring tool include:

@dkeza
dkeza / git_submodules.md
Created March 27, 2018 09:32 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.
@dkeza
dkeza / dob2p.prg
Created March 14, 2018 10:09
Call foxbin2prg.exe to create text / binary files in Visual FoxPro, and use it with Git/SVN
LPARAMETERS lp_cPJM
LOCAL l_cPJX, l_cRun, l_cParam
? "Run foxbin2prg.exe..."
IF EMPTY(lp_cPJM)
IF NOT (TYPE("_vfp.ActiveProject")="O" AND NOT ISNULL(_vfp.ActiveProject))
? "Error. Project file must be open!"
RETURN .F.
ENDIF
l_cPJX = _vfp.ActiveProject.Name
_vfp.ActiveProject.Close()
@dkeza
dkeza / gist:f4ff4e5858707a1e569f16ce15e2bc0f
Last active March 7, 2018 15:31 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@dkeza
dkeza / fixtime.py
Last active November 25, 2021 20:54
Fix wrong date time on Raspberry Pi 3 in LibreELEC (Krypton) v8.0.1 MR (Kodi), when connected over WiFi
#!/usr/bin/env python
## Python 2.7 script
## Use it as workaround for Kodi LibreELEC wrong date time bug, when used on Raspberry Pi 3 over WiFi.
## Log in into LibreELEC over SSH, create this script as executable,
##
## $ nano fixtime.py
## $ chmod +x fixtime.py
##
## and call it from autostart.sh
@dkeza
dkeza / main.go
Last active January 29, 2021 23:05
golang Content-Type: multipart/form-data; boundary
package main
import (
"fmt"
"io"
"io/ioutil"
"net/http"
"strings"
)
@dkeza
dkeza / createtable.prg
Last active November 14, 2016 08:20
Test SebastiaanKlippert/go-foxpro-dbf Number, Datetime and Currency VisualFoxPro fields
CREATE TABLE testf (dtime t, number N(12), curr Y)
INSERT INTO testf (dtime, number, curr) VALUES (DATETIME(), 8027846523, 1234567890.1234)
RETURN .T.