Skip to content

Instantly share code, notes, and snippets.

View jannson's full-sized avatar
💭
I may be slow to respond.

Jason jannson

💭
I may be slow to respond.
View GitHub Profile
@jannson
jannson / openwrt-qemu.md
Created July 4, 2024 06:08 — forked from extremecoders-re/openwrt-qemu.md
Running OpenWRT ARM under QEMU

Environment

The steps shown below are done on a Ubuntu VM using Qemu 3.0

$ qemu-system-arm -version
QEMU emulator version 3.0.0
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

To quit Qemu at any time press Ctrl+a x, i.e. Ctrl+a and then x

@jannson
jannson / ssim.go
Created April 10, 2023 13:16
Implement ssim in Golang
package main
import (
"fmt"
"os"
"log"
"image"
"image/color"
"image/jpeg"
"math"
"errors"
@jannson
jannson / git-backup.sh
Created November 30, 2022 08:19 — forked from jasonish/git-backup.sh
Script to backup your git repos and optionally push them to another remote.
#! /bin/sh
#
# Script to backup git repositories.
#
# For each subdirectory ending in .git:
# - perform a git fetch from origin.
# - perform a git push --all to all remotes other than origin.
repos=`find * -type d -name \*.git`
@jannson
jannson / glibc_install.sh
Created December 18, 2021 10:50 — forked from cheuerde/glibc_install.sh
Install GNU libc version parallel to existing system
# Claas Heuer, August 2015
#
# urls:
# http://stackoverflow.com/questions/847179/multiple-glibc-libraries-on-a-single-host
# http://www.gnu.org/software/libc/download.html
cd $HOME
mkdir glibc_update
cd glibc_update
@jannson
jannson / linkease.md
Last active October 10, 2021 07:35
linkease.md

主题参考

全平台的远程文件管理工具

功能

安装易有云存储端之后,可以轻松远程设备上面的文件、相片、电影、文档、压缩包

智能链路远程管理

@jannson
jannson / fsevents_windows.go
Created January 5, 2021 00:08 — forked from pkrnjevic/fsevents_windows.go
Windows USN Journal sample in Go based on Jeffrey Richter's superb MSDN Journal article. A work in progress, intended to provide similar API to go.fsevents.
//
// File: fsevents_windows.go
// Date: October 29, 2013
// Author: Peter Krnjevic <[email protected]>, on the shoulders of many others
//
// This code sample is released into the Public Domain.
//
package fsevents
import (
#define __MODULE__ "DHEXMPL"
#define __IDENT__ "X.00-01"
#ifdef __GNUC__
#ident __IDENT__
#endif
#pragma GCC diagnostic ignored "-Wparentheses"
#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
#pragma GCC diagnostic ignored "-Wmissing-braces"
@jannson
jannson / opengl-win32.cpp
Created December 13, 2019 08:48
opengl-win32.cpp
// Opengltest01.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include <windows.h>
#define GLEW_STATIC
#include <GL/glew.h>
#include <GL/gl.h>
@jannson
jannson / README.md
Created July 10, 2019 12:47 — forked from oznu/README.md
QEMU + Ubuntu ARM aarch64

QEMU + Ubuntu ARM aarch64

These are the steps I used to get Ubuntu ARM aarch64 running with QEMU on OSX.

Get Ubuntu Image and QEMU EFI:

wget https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-arm64-uefi1.img
wget https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/QEMU_EFI.fd
@jannson
jannson / logger.go
Created January 17, 2019 04:14
deadlock discovery
package sync
import (
"log"
)
var (
logDebug = log.Printf
logInfo = log.Printf
logWarn = log.Printf