Skip to content

Instantly share code, notes, and snippets.

View wsvn53's full-sized avatar

Ethan wsvn53

View GitHub Profile
@mowings
mowings / README.md
Last active July 22, 2024 12:18
Set up xhyve with Ubuntu 16.04

Introduction

Setting up an OS to work with xhyve can be a bit tricky, but it's not impossible. These intructions should be generally applicable to most versions of Linux.

Create a disk image file

Xhyve will use a file as a logical disk. Be sure you have the filesize you need, because growing the file later is tricky to impossible (you could try to use qcow or similar to get around this, but qcow volumes can be tricky to mount).

dd if=/dev/zero of=hdd.img bs=1g count=32 # Create a 32 gig disk. Raise 'count' as desired
@zjhui
zjhui / gist:9530924
Created March 13, 2014 15:45
在wr720n上利用extroot将openwrt扩容
1、在openwrt上安装block-mount,挂载硬盘时需要它
opkg update
opkg install block-mount
2、挂载硬盘
mount /dev/sda2 /mnt
3、把/目录下的文件迁移到U盘,pivot-root方式,适用于Barrier Breaker(trunk)版本
mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@zvving
zvving / CLLocation+Sino.h
Last active January 9, 2019 02:39
火星坐标系转换扩展。Earth(国外 WGS84), mars(国内 GCJ-02), bearPaw(百度 BD-09) 坐标系间相互转换
//
// CLLocation+Sino.h
//
// Created by [email protected] on 13-4-26.
// 火星坐标系转换扩展
//
// earth(国外 WGS84), mars(国内 GCJ-02), bearPaw(百度 BD-09) 坐标系间相互转换
// 未包含 mars2earth. 需要这个可参考 http://xcodev.com/131.html
#import <CoreLocation/CoreLocation.h>
@appden
appden / reload.bash
Created March 27, 2011 18:27
Reload your bash profile in all open bash instances
# put this in your bash profile (change the line below if you use .bash_profile)
# refresh profile on USR1 signal
trap 'eval $(PATH= /usr/libexec/path_helper -s) && source ~/.profile' USR1
# send USR1 signal to all bash instances
reload() {
ps -xo pid,command | grep ' \-bash' | awk '{print $1}' | while read pid; do
kill -USR1 $pid
done