Skip to content

Instantly share code, notes, and snippets.

View leoncamel's full-sized avatar
Focusing

Xiaolin Zhang leoncamel

Focusing
  • Beijing
View GitHub Profile
package main
import (
"fmt"
"os/exec"
"time"
)
func main() {
cmd := exec.Command("sleep", "1024")
@leoncamel
leoncamel / gist:2942254
Created June 16, 2012 19:01
build gcc on mac lion
#!/bin/sh
# TODO:
# 1: Could not find the frame base for "main(int, char**)".
# gdb ./hello
# GNU gdb (GDB) 7.4
# Copyright (C) 2012 Free Software Foundation, Inc.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
# This is free software: you are free to change and redistribute it.
# There is NO WARRANTY, to the extent permitted by law. Type "show copying"
From e465847873fdb54de7bc834c2d3d78639b98427a Mon Sep 17 00:00:00 2001
From: Matthew Waters <matthew@centricular.com>
Date: Tue, 31 Jan 2017 20:56:59 +1100
Subject: [PATCH] webrtcbin: an element that handles the transport aspects of
webrtc connections
SDP's are generated and consumed according to the W3C PeerConnection API
available from https://www.w3.org/TR/webrtc/
The SDP is either created initially from the connected
@leoncamel
leoncamel / webrtc.rst
Last active May 18, 2019 14:22 — forked from voluntas/webrtc.rst
WebRTC 資料まとめ
@leoncamel
leoncamel / janus-subscriber-example.md
Created May 9, 2019 12:39
janus subscriber example

create

  • POST
{
    "janus":"create",
@leoncamel
leoncamel / gist:2943625
Created June 17, 2012 06:04
my brew installation list
#!/bin/sh
# GNU coreutils
brew install coreutils
brew install findutils
brew install binutils
brew install patchutils
# gdb & gcc
brew install gdb
@leoncamel
leoncamel / Makefile
Last active May 18, 2016 06:10
minimum libhdfs example
CC=gcc
JVM_ROOT=/usr/lib/jvm/java-7-openjdk-amd64/
HADOOP_ROOT=/home/xiaolin/work/apache/hadoop-2.7.1
export CLASSPATH=$(shell ${HADOOP_ROOT}/bin/hadoop classpath --glob)
export LD_LIBRARY_PATH=${HADOOP_ROOT}/lib/native:${JVM_ROOT}/jre/lib/amd64/server/
CFLAGS = -O2 -g -Wall -fmessage-length=0 -I${HADOOP_ROOT}/include
OBJS = hello.o
@leoncamel
leoncamel / gist:6076222
Last active December 20, 2015 05:09
Serialization in C# driver of MongoDB
using System;
using System.Collections.Generic;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson.Serialization.Options;
using MongoDB.Driver;
namespace TestMongoDot
{
class MyEntity
diff --git a/GHC/Integer.hs b/GHC/Integer.hs
index c9b50a7..8fd41d9 100644
--- a/GHC/Integer.hs
+++ b/GHC/Integer.hs
@@ -28,6 +28,7 @@ module GHC.Integer (
eqInteger, neqInteger, absInteger, signumInteger,
leInteger, gtInteger, ltInteger, geInteger, compareInteger,
divModInteger, quotRemInteger, quotInteger, remInteger,
+ modInteger, divInteger,
encodeFloatInteger, decodeFloatInteger, floatFromInteger,
diff -urN emacs-24.1/lisp/term/ns-win.el emacs-24.1-lion-fullscreen-patched/lisp/term/ns-win.el
--- emacs-24.1/lisp/term/ns-win.el 2012-05-14 21:00:02.000000000 +0900
+++ emacs-24.1-lion-fullscreen-patched/lisp/term/ns-win.el 2012-06-13 00:52:11.000000000 +0900
@@ -930,7 +930,11 @@
(add-to-list 'frame-creation-function-alist '(ns . x-create-frame-with-faces))
(add-to-list 'window-system-initialization-alist '(ns . ns-initialize-window-system))
-
+(declare-function ns-toggle-fullscreen-internal "nsfns.m" ())
+(defun ns-toggle-fullscreen ()