Skip to content

Instantly share code, notes, and snippets.

How to Setup emacs irony-mode in Ubuntu-12.04

I recently found a nice emacs-mode, [irony-mode], which can be used with [company-mode], [flycheck-mode], and [eldoc-mode]. It works nicely with CMake-based projects. The document contains a list of instructions for setting things up. I assume that you're using a fresh-installed Ubuntu-12.04.5 (64-bit). It uses [Lean theorem prover][lean] as an example project.

@soonhokong
soonhokong / c9io_lean.sh
Last active August 29, 2015 14:16
c9.io + lean
#!/usr/bin/env bash
sudo add-apt-repository --yes ppa:leanprover/lean
sudo apt-get -qq update
sudo apt-get -qq install lean
mkdir ~/workspace/.c9/runners
cat << EOF > ~/workspace/.c9/runners/Lean.run
// Create a custom Cloud9 runner - similar to the Sublime build system
// For more information see https://docs.c9.io/custom_runners.html
@soonhokong
soonhokong / exit_code_wrapper.sh
Last active August 29, 2015 14:15
exit_code_wrapper.sh
#!/usr/bin/env bash
#
# Usage: ./exit_code_wrapper.sh /path/to/dReal /path/to/smt2 option_to_dReal1 option_to_dReal2 option_to_dReal3 ...
#
# Return:
#
# 51 if smt2 is SAT
# 52 if smt2 is UNSAT
# 1 if there is any error
#
@soonhokong
soonhokong / Normal_Distribution_PDF_Integration_CAPD3_CAPD4.md
Last active August 30, 2015 16:09
Integration of Normal Distribution PDF using CAPD3 and CAPD4

We want to integrate the probability density function for normal distribution:

image1

To simplify the problem, let's pick mean = 0.0, standard deviation = 1.0. In theory, integration of this fuction from x = -oo to x = oo should give P = 1.0. Using CAPD, let's compute for the range X = [-10, 10] whose prob must be less than 1.0.

image2

Output

@soonhokong
soonhokong / capddynsys-4.0-timestep_example.md
Last active August 29, 2015 14:10
capdDynSys-4.0 time step

Example

This is a slightly modified example based on capdDynSys4/examples/encloseTrajectory/encloseTrajectoryBetweenTimeSteps.cpp file. The main difference is the ODE that it computes the enclosed trajectory: "par:k_0;var:t_0, v_0;fun:1.0, (k_0*t_0)" and the time of integration, 17.

Modified lines are commented with // <----- MODIFIED.

Code

@soonhokong
soonhokong / capd-poincare.md
Last active August 29, 2015 14:10
CAPD4-PoincareSection-Example

Code from CAPD Author

#include <iostream>
#include "capd/capdlib.h"
using namespace std;
using namespace capd;

int main(){
  cout.precision(17);
#! /usr/bin/env bash
# Author: Damien Cassou
#
# This is the script I use to build Emacs packages for Ubuntu. These
# packages are uploaded to
# https://launchpad.net/~cassou/+archive/emacs/. Each package is
# either build from a Debian package or from
# http://emacs.naquadah.org/.
@soonhokong
soonhokong / travis.sh
Last active August 29, 2015 14:08 — forked from rejeep/travis.sh
#!/bin/sh
# This script will setup Evm (Emacs Version Manager) and Cask on
# Travis to use for Emacs Lisp testing.
#
# In .travis.yml, add this:
#
# - curl -fsSkL https://gist.github.com/rejeep/7736123/raw > travis.sh && source ./travis.sh
#
# Emacs 24.3 is installed in the above script because Cask requires
@soonhokong
soonhokong / emacs-travis.sh
Created October 30, 2014 02:50
Emacs-Travis
#!/bin/sh
# This script will setup Evm (Emacs Version Manager) and Cask on
# Travis to use for Emacs Lisp testing.
#
# In .travis.yml, add this:
#
# - curl -fsSkL https://gist.github.com/rejeep/7736123/raw > travis.sh && source ./travis.sh
#
# Emacs 24.3 is installed in the above script because Cask requires