Skip to content

Instantly share code, notes, and snippets.

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

bygreencn bygreencn

💭
I may be slow to respond.
View GitHub Profile
#!/bin/bash
###########################################################################
# Choose your ffmpeg version and your currently-installed iOS SDK version:
#
VERSION="2.0.2"
SDKVERSION="7.0"
ARCHS="armv7 armv7s i386"
#
#
#include "thread_id_pool.h"
#include <pthread.h>
#include <assert.h>
static pthread_key_t s_tkey;
static pthread_once_t s_tkey_once;
static void freeKey(void *p)
{
ThreadIdPool::TVal *val = (ThreadIdPool::TVal*) p;
// ==UserScript==
// @name ShadowX Profile
// @namespace com.gmail.open.xuyiming
// @version 0.1
// @description 在 ShadowX 的节点页面显示 JSON 格式的配置文件
// @author +依然独特
// @match *://shadowx.work/user/node/*
// @match *://shadowx.co/user/node/*
// @include *://shadowx.work/user/node/*
// @include *://shadowx.co/user/node/*
@bygreencn
bygreencn / eggs_detector.cpp
Last active August 29, 2015 14:27 — forked from BloodAxe/eggs_detector.cpp
Image enchancement and Hough transform example
/**
* @brief Image enchancement and Hough transform example
* @author Eugene Khvedchenya <[email protected]>
* @copyright computer-vision-talks.com/articles/how-to-detect-circles-in-noisy-image/
*/
#include <opencv2/opencv.hpp>
@bygreencn
bygreencn / min-char-rnn.py
Created January 17, 2017 13:58 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)

Testing qemu 2.1 arm64 support

qemu-system-aarch64 -m 1024 -cpu cortex-a57 -nographic -machine virt -kernel trusty-server-cloudimg-arm64-vmlinuz-generic -append 'root=/dev/vda1 rw rootwait mem=1024M console=ttyAMA0,38400n8 init=/usr/lib/cloud-init/uncloud-init ds=nocloud ubuntu-pass=ubuntu' -drive if=none,id=image,file=trusty-server-cloudimg-arm64-disk1.img -netdev user,id=user0 -device virtio-net-device,netdev=user0 -device virtio-blk-device,drive=image

qemu-system-aarch64 -m 1024 -cpu cortex-a57 -nographic -machine virt -kernel trusty-server-cloudimg-arm64-vmlinuz-generic -append 'root=/dev/vda1 rw rootwait mem=1024M console=ttyAMA0,38400n8 init=/usr/lib/cloud-init/uncloud-init ds=nocloud' -drive if=none,id=image,file=trusty-server-cloudimg-arm64-disk1.img -netdev user,id=user0 -device virtio-net-device,netdev=user0 -device virtio-blk-device,drive=image

[A Quick'n'Dirty Set-up of an Aarch64 Ubuntu 14.04 VM with QEMU]

@bygreencn
bygreencn / 01-vilma-dependencies
Created April 19, 2017 10:03 — forked from cfpperche2/01-vilma-dependencies
Ubuntu 14.04 + Kernel 3.14.17 + Xenomai 2.6.4 + RTnet-master + ROS Indigo + Orocos 2.8
#!/usr/bin/env bash
# This is an installation tutorial of the OROCOS v2.8 with the ROS Indigo and
# the Xenomai 2.6.4 on Ubuntu 14.04.
# The following is adapted from:
# https://help.ubuntu.com/community/Kernel/Compile#Alternate_Build_Method:_The_Old-Fashioned_Debian_Way
# http://www.xenomai.org/documentation/xenomai-2.6/README.INSTALL
# Update kernel
sudo apt-get install linux-image-generic-lts-trusty
@bygreencn
bygreencn / export.c
Last active May 3, 2017 03:00
Export Def form DLL for MSVC
#include <windows.h>
#include <WinNT.h>
#include <stdio.h>
#include <stdlib.h>
#include <map>
#include <string>
#define PEEF_PRINT_ORDINALS 0x01
@bygreencn
bygreencn / Install NVIDIA Driver and CUDA.md
Created July 17, 2017 06:09 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora
@bygreencn
bygreencn / VTK5.md
Created July 26, 2017 09:31 — forked from UnaNancyOwen/VTK5.md
Building VTK with Visual Studio