Skip to content

Instantly share code, notes, and snippets.

View c9s's full-sized avatar

c9s

  • Taipei, Taiwan
  • 14:23 (UTC +08:00)
  • X @c9s
View GitHub Profile
#if _GNU_SOURCE || POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700 || __DARWIN_C_LEVEL >= 200809L
#define HAVE_STRNDUP
#endif
#if _SVID_SOURCE || _BSD_SOURCE \
|| _XOPEN_SOURCE >= 500 \
|| _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED \
|| /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L \
|| __DARWIN_C_LEVEL >= 200809L
#define HAVE_STRDUP
# zsh config here
zmodload -a colors
zmodload -a autocomplete
zmodload -a complist
autoload -U colors
autoload -U promptinit
autoload -Uz vcs_info
# zstyle ':vcs_info:git*' formats "(%s) %6.6i %c%u %b%m"
# zstyle ':vcs_info:git*' actionformats "(%s|%a) %6.6i %c%u %b%m"
/*
* test.cc
* Copyright (C) 2014 c9s <c9s@c9smba.local>
*
* Distributed under terms of the MIT license.
*/
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
Measuring Matx A * B...
Measurement finished. Matx A * B: 5.121e-05
Measuring Mat A * B ref stack memory...
Measurement finished. Mat A * B ref stack memory: 1.04867
Measuring Mat A * B ref heap memory...
Measurement finished. Mat A * B ref heap memory: 1.52618
package main
import "fmt"
import "os"
import "path/filepath"
import "sort"
type Files []string
func (self Files) Len() int { return len(self) }
Waiting sub 2
Wait.lock
FUinWnlaioiscthk.e cdao nd.wait
task
FDionnies sub 2
hFinished task
ed task
@c9s
c9s / install-hhvm-macports.sh
Last active August 29, 2015 14:06
Here are the instructions that I used to build HHVM on Mac OS 10.9 with Macports
#!/bin/bash
git clone --recursive git://github.com/facebook/hhvm.git
cd hhvm
git checkout -t origin/HHVM-3.2
wget http://www.canonware.com/download/jemalloc/jemalloc-3.6.0.tar.bz2
tar xvf jemalloc-3.6.0.tar.bz2
cd jemalloc-3.6.0
cat <<END | patch -p0 src/jemalloc.c
@c9s
c9s / cmake.log
Created September 25, 2014 09:32
cat cmake.log
-- The C compiler identification is GNU 4.8.3
-- The CXX compiler identification is GNU 4.8.3
-- The ASM compiler identification is GNU
-- Found assembler: /opt/local/bin/gcc-mp-4.8
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /opt/local/bin/gcc-mp-4.8
make VERBOSE=1
/Applications/Xcode.app/Contents/Developer/usr/bin/make rec.opt
set -e; for i in fsevents utils fsnotify_darwin avl dfind globals hhi heap procs deps parsing naming typing server socket client stubs; do /Applications/Xcode.app/Contents/Developer/usr/bin/make -C $i all.opt || exit 1; done
ocamlc -g -dtypes -w -21 -warn-error +a -ccopt -g -c fsevents_stubs.c -o fsevents_stubs.o
ocamlc -g -dtypes -w -21 -warn-error +a -c fsevents.mli
ocamlopt -g -dtypes -w -21 -warn-error +a -c fsevents.ml
ocamlmklib -o fsevents -L. -framework CoreServices -framework CoreFoundation fsevents_stubs.o fsevents.cmx
ocamlopt -g -dtypes -w -21 -warn-error +a -c hh_json.ml
ocamlc -g -dtypes -w -21 -warn-error +a -c path.mli
ocamlopt -g -dtypes -w -21 -warn-error +a -c path.ml
09:07 -!- Irssi: Join to #webconf.tw was synced in 133 secs
09:08 < MouseMs> 大家早安
09:08 < locy69> 早安
09:09 < StarNight> 早安!~
09:10 < MouseMs> [SITCON] 答案填寫單將於9:30開放submit答案 PS:同時也會開放第五題唷 今天的題目都比較簡單 歡迎大家挑戰:)
09:13 < bency> 早安
09:13 < BeataLin> 早安!
09:21 < SITCON> 今天也有3題等著大家挑戰唷^^
09:23 < kikiqqp_> 今天R0的有線網路有點怪怪的
09:25 < ChAndrew> Good Morning!!