Skip to content

Instantly share code, notes, and snippets.

View 19317362's full-sized avatar

david.wang 19317362

View GitHub Profile
@19317362
19317362 / socket.io.cs
Created June 3, 2016 23:42 — forked from prabirshrestha/socket.io.cs
socket.io 4 .net
namespace WebSocketHelloEchoServer.SocketIo
{
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Net.WebSockets;
using System.Reflection;
@19317362
19317362 / TaskHelpers.cs
Created March 26, 2017 15:08 — forked from itsff/TaskHelpers.cs
Extensions for Task Parallel Library from ASP.NET MVC project.
/*
Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
Microsoft Open Technologies would like to thank its contributors, a list
of whom are at http://aspnetwebstack.codeplex.com/wikipage?title=Contributors.
Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may
obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@19317362
19317362 / 030_update_platform_config.js
Created May 21, 2017 03:31 — forked from marcocarnazzo/030_update_platform_config.js
Ionic/Cordova update platform config
#!/usr/bin/env node
/** This hook updates platform configuration files based on preferences and config-file data defined in config.xml.
Currently only the AndroidManifest.xml and IOS *-Info.plist file are supported.
See http://stackoverflow.com/questions/28198983/ionic-cordova-add-intent-filter-using-config-xml
Preferences:
1. Preferences defined outside of the platform element will apply to all platforms
2. Preferences defined inside a platform element will apply only to the specified platform
@19317362
19317362 / asp.net MVC jqGrid model
Created April 19, 2017 20:52
Strongly typed asp.net MVC model for jqGrid in C#
namespace CodeFirst.Models
{
public class Column
{
public string name { get; set; }
public string index { get; set; }
public int width { get; set; }
public string align { get; set; }
public Column(string _name, string _index)
@19317362
19317362 / gist:d37fbf4131dba1e079b210fd3563ef7e
Created May 4, 2018 01:26 — forked from philipn/gist:5274197
Running Ubuntu on a Macbook Air

Running Ubuntu on a Macbook Air

You don't have to be a slave to OS X! Here's a guide to a sane dual-booting setup with Ubuntu 12.10 on your shiny MacBook Air. This is written and tested for a MacBook Air 5,2 (Mid 2012), but likely works the same with any modern Macbook.

Install according to instructions at this URL:

@19317362
19317362 / pre-commit-clang-format
Created August 15, 2018 02:31 — forked from wangkuiyi/pre-commit-clang-format
Git pre-commit hook that invokes clang-format to reformat C/C++/Objective-C source code.
#!/bin/bash
# git pre-commit hook that runs an clang-format stylecheck.
# Features:
# - abort commit when commit does not comply with the style guidelines
# - create a patch of the proposed style changes
# modifications for clang-format by rene.milk@wwu.de
# This file is part of a set of unofficial pre-commit hooks available
# at github.
@19317362
19317362 / C++ Install gSOAP.txt
Created November 22, 2018 03:55 — forked from callemall/C++ Install gSOAP.txt
Install gSOAP for using C++ programs to access a SOAP API. Install from an account that has appropriate system privileges.
wget http://sourceforge.net/projects/gsoap2/files/gSOAP/gsoap_2.8.1.zip/download
unzip gsoap_2.8.1.zip
cd gsoap-2.8/
./configure --prefix=/usr
make
make install
@19317362
19317362 / ubuntu_install_webcamstudio.sh
Created December 5, 2018 00:55 — forked from marcelog/ubuntu_install_webcamstudio.sh
Install webcamstudio in Ubuntu to setup a virtual webcam to use as the phone camera in Android Emulator
#!/bin/bash
apt-get install software-properties-common
dpkg -S add-apt-repository
add-apt-repository ppa:webcamstudio/webcamstudio-dailybuilds
apt-get update
apt-get install webcamstudio
modprobe webcamstudio
@19317362
19317362 / context_fix_gcc49_callcc.patch
Created December 13, 2018 08:14 — forked from Lastique/context_fix_gcc49_callcc.patch
Patch to fix Boost.Context 1.64 for gcc 4.9
From e66b64c1ec0bcc496d3d9212d66959351a5af551 Mon Sep 17 00:00:00 2001
From: Andrey Semashev <andrey.semashev@gmail.com>
Date: Thu, 20 Apr 2017 22:59:55 +0300
Subject: [PATCH] Fix compilation with gcc 4.9.
The compiler apparently has problems with template ordering, so:
- Remove callcc overloads that have no arguments for the function. These
overloads are ambiguous with the overloads taking variadic args. The
no-args case is covered by the variadic iverloads anyway.
@19317362
19317362 / YUV Sample files.txt
Created December 18, 2018 08:25 — forked from commshare/YUV Sample files.txt
YUV Sample files
http://www.sunrayimage.com/examples.html
http://trace.eas.asu.edu/yuv/ 都是yuv420p的
Example Images Download:
You can download the example images of all the suppoted formats in version 2.