Skip to content

Instantly share code, notes, and snippets.

Darcy Liu darcyliu

Block or report user

Report or block darcyliu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@darcyliu
darcyliu / install_txt2man.sh
Last active Apr 19, 2016
Install txt2man on Mac OSX / Linux
View install_txt2man.sh
curl -o /usr/local/bin/txt2man http://mvertes.free.fr/txt2man/txt2man && chmod 755 /usr/local/bin/txt2man
View install_spark_centos7.sh
#!/bin/bash
# Install Spark on CentOS 7
yum install java -y
java -version
yum install wget -y
wget http://downloads.typesafe.com/scala/2.11.7/scala-2.11.7.tgz
tar xvf scala-2.11.7.tgz
sudo mv scala-2.11.7 /usr/lib
sudo ln -s /usr/lib/scala-2.11.7 /usr/lib/scala
@darcyliu
darcyliu / install_mlpack_osx.sh
Created Mar 31, 2016
Install mlpack on OSX 10.11 (EI Capitan)
View install_mlpack_osx.sh
#!/bin/bash
# Install mlpack on OSX 10.11 (EI Capitan)
curl -O http://tenet.dl.sourceforge.net/project/arma/armadillo-6.500.5.tar.gz
tar zxvf armadillo-6.500.5.tar.gz
cd armadillo-6.500.5
./configure
make
make install
cd ..
@darcyliu
darcyliu / install_mlpack.sh
Created Mar 22, 2016
Install mlpack on CentOS 7
View install_mlpack.sh
#!/bin/bash
# Install mlpack on CentOS 7
yum -y groupinstall "Development Tools"
yum -y install epel-release
yum -y install boost-devel boost-test boost-program-options boost-math libxml2-devel armadillo-devel
yum -y install txt2man
yum -y install cmake
wget http://www.mlpack.org/files/mlpack-2.0.1.tar.gz
tar xzvf mlpack-2.0.1.tar.gz
@darcyliu
darcyliu / phonetic.m
Last active Feb 22, 2016
phonetic transcription
View phonetic.m
//
// main.m
// phonetic transcription
//
// Created by Darcy Liu on 20/02/2016.
// Copyright © 2016 Darcy Liu. All rights reserved.
//
// clang main.m -fobjc-arc -fmodules -o main
@darcyliu
darcyliu / apache.conf
Last active Mar 21, 2017
Issue Let's Encrypt certificates on CentOS
View apache.conf
# host challenge files on Apache for your domain
<VirtualHost *:80>
ServerAdmin webmaster@example.com
DocumentRoot /var/www/example.domain
ServerName example.domain
# Add following code to your Apache VirtualHost
Alias "/.well-known/acme-challenge" "/var/www/challenges/"
<Directory "/var/www/challenges/">
Header set Content-Type "application/jose+json"
@darcyliu
darcyliu / centos7_timechine.sh
Last active Jun 13, 2019
Install Time Machine service on CentOS 7
View centos7_timechine.sh
# Install Time Machine service on CentOS 7
# http://netatalk.sourceforge.net/wiki/index.php/Netatalk_3.1.7_SRPM_for_Fedora_and_CentOS
# http://confoundedtech.blogspot.com/2011/07/draft-draft-ubuntu-as-apple-time.html
yum install -y rpm-build gcc make wget
# install netatalk
yum install -y avahi-devel cracklib-devel dbus-devel dbus-glib-devel libacl-devel libattr-devel libdb-devel libevent-devel libgcrypt-devel krb5-devel mysql-devel openldap-devel openssl-devel pam-devel quota-devel systemtap-sdt-devel tcp_wrappers-devel libtdb-devel tracker-devel
yum install -y bison docbook-style-xsl flex dconf
@darcyliu
darcyliu / install_opencv_on_osx.sh
Last active Apr 3, 2016
Install OpenCV on OS X Yosemite
View install_opencv_on_osx.sh
#!/bin/bash
# Install OpenCV on OS X Yosemite
# # install cmake
# curl -O https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz
# tar xzvf cmake-3.4.3.tar.gz
# cd cmake-3.4.3
# ./bootstrap
# make
# make install
@darcyliu
darcyliu / NSString+AppStore.h
Created Nov 5, 2014
Short links to the App Store for your apps and company
View NSString+AppStore.h
//
// NSString+AppStore.h
// NSString+Additions
//
// Created by Darcy Liu on 11/5/14.
// Copyright (c) 2014 Darcy Liu. All rights reserved.
//
#import <Foundation/Foundation.h>
@darcyliu
darcyliu / result.txt
Created Oct 29, 2014
text height calculation
View result.txt
size: {102.804, 486.74399999999957}
rect: {{0, 0}, {102.804, 486.74399999999957}}
suggestedSize: {98.6953125, 480}
rect: {{0, 0}, {100, 487}}
You can’t perform that action at this time.