Skip to content

Instantly share code, notes, and snippets.

View mdhorn's full-sized avatar

Mark Horn mdhorn

View GitHub Profile
@mdhorn
mdhorn / GitHub-Forking.md
Created August 1, 2016 19:59 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, when I started going through the process of forking and issuing pull requests, I had some trouble figuring out the proper method for doing so and made quite a few mistakes along the way. I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your

@mdhorn
mdhorn / check_uvcvideo_module.sh
Last active October 1, 2016 22:41
Check supported Intel Realsense Camera
#!/bin/bash
# Check for uvcvideo loadable kernel module patches in the running kernel
UVC_MODULE=$(modinfo -F filename uvcvideo)
PATCHED_FORMATS=$(/usr/bin/strings ${UVC_MODULE} | \
/bin/egrep '\((Y8I|Y12I|Z16|SRGGB10P|RAW8|RW16|INVZ|INZI|INVR|INRI|INVI|RELI|L8|L16|D16)\)' | \
/usr/bin/wc -l)
case "${PATCHED_FORMATS}" in
15)
echo "INFO: Intel RealSense(TM) F200, SR300, R200, LR200, and ZR300 cameras are supported."
@mdhorn
mdhorn / enable_kernel_sources.sh
Last active October 26, 2016 21:36
Enable Debian Sources in APT for downloading kernel sources
#!/bin/bash
#
# Script to enable the Debian sources for kernel
#
# Ensure we only use safe paths
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
function update_apt_listfile {
local found=0
@mdhorn
mdhorn / live-encrypted.yaml
Created November 27, 2018 01:02
clr-installer config file for generating encrypted live image
#clear-linux-config
# switch between aliases if you want to install to an actuall block device
# i.e /dev/sda
block-devices: [
{name: "bdevice", file: "live-encrypt.img"}
]
targetMedia:
- name: ${bdevice}
package main
import (
"fmt"
"golang.org/x/text/language"
"golang.org/x/text/language/display"
)
func main() {
$ sudo /home/mhorn/Clear/clr-installer/.gopath/bin/clr-installer-gui -l 4
fatal error: unexpected signal during runtime execution
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x0]
runtime stack:
runtime.throw(0xb7c475, 0x2a)
/usr/lib/golang/src/runtime/panic.go:617 +0x72
runtime.sigpanic()
/usr/lib/golang/src/runtime/signal_unix.go:374 +0x4a9
@mdhorn
mdhorn / README-IMAGES.html
Created June 7, 2019 16:52
Proposed image readme cleanup
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<title>Clear Linux* OS Images</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1>Clear Linux* OS Images</h1>
From c4000f310b9678f1fcd8825199a92ea0e893ed5f Mon Sep 17 00:00:00 2001
From: Mark D Horn <mark.d.horn@intel.com>
Date: Fri, 28 Jun 2019 17:00:59 -0700
Subject: [PATCH] kernel: bug fix for clearing parameters
graphical will crash if you "confirm" without a value
for the kernel command line.
Also fixed the same bug in the text-based interface.
package main
import (
"github.com/gotk3/gotk3/gtk"
"log"
)
// Create and initialize the window
func setupWindow(title string) *gtk.Window {
win, err := gtk.WindowNew(gtk.WINDOW_TOPLEVEL)
@mdhorn
mdhorn / clr-installer-log.txt
Created January 27, 2020 22:29
swupd fails for cert while insecure
2020/01/27 14:22:09 [INF] Installing base OS and configured bundles
2020/01/27 14:22:09 [DBG] Installing bundles: os-core, os-core-update, NetworkManager, clr-installer, telemetrics, vim, kernel-native
2020/01/27 14:22:09 [DBG] Bundle os-core was already installed with the core bundles, skipping
2020/01/27 14:22:09 [DBG] Bundle os-core-update was already installed with the core bundles, skipping
2020/01/27 14:22:09 [DBG] swupd os-install --debug --allow-insecure-http --contenturl=http://mhorn-clr01.jf.intel.com/mixer/ --versionurl=http://mhorn-clr01.jf.intel.com/mixer/ --path=/tmp/install-821644309 --statedir=/tmp/install-821644309/var/lib/swupd -V latest --force --no-boot-update --json-output -B os-core-update,openssh-server,NetworkManager,clr-installer,telemetrics,vim,kernel-native
2020/01/27 14:22:09 [DBG] Using default shellProxy.DefaultGetProxyValue
2020/01/27 14:22:09 [DBG] [Previous line repeated 4 times]
2020/01/27 14:22:09 [DBG] cmd.Env: [ftp_proxy=ftp://proxy.jf.intel.com:911 FTP_PROXY=ftp://proxy.j