This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://aur.archlinux.org/cgit/aur.git/snapshot/lcov.tar.gz | tar zxf - | |
cd lcov | |
makepkg -csi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# boost 1.46.1, from msys | |
$ bootstrap.bat --with-toolset=mingw | |
$ mv project-config.jam project-config.jam.old | |
$ sed s/mingw/gcc/g project-config.jam.old > project-config.jam | |
$ bjam.exe --prefix=C:/boost/boost-1.46.1 -j8 | |
$ bjam.exe install | |
# boost 1.54.0, from cmd.exe | |
> boostrap.bat mingw | |
> b2.exe --prefix=C:\Libs\boost toolset=gcc -j8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
*/ | |
#ifndef _SINGLETON_H | |
#define _SINGLETON_H | |
namespace lib { | |
namespace detail { | |
template <typename T> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The code below only manages vertical position and assumes the text is | |
# being inserted before the current cursor (of which there is only one | |
# and no text is highlited). This can be expanded to manage the | |
# horizontal position and multi-selected text if needed using the same | |
# principals as used below. | |
v = sublime.active_window().active_view() | |
pos = v.sel()[0][0] | |
y0 = v.viewport_position()[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/sh | |
# | |
# Build script to cross-compile OpenOCD with MinGW on Mint Linux (FTDI, JLINK, TI-ICDI, OSBDM). | |
# | |
# 7zip | |
# curl | |
# git | |
# MinGW-W64 | |
# libtool | |
# Automake |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ype bfm_uctrl_vector_t is | |
array (integer range <>) of bfm_uctrl_t; | |
function resolve_bfm_ctrl ( | |
s : bfm_uctrl_vector_t ) return bfm_uctrl_t; | |
subtype bfm_ctrl_t is | |
resolve_bfm_ctrl bfm_uctrl_t; | |
procedure do_req ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type axi_data is record | |
val : std_logic; | |
end record; | |
type axi_data_array is array (natural range <>) of axi_data; | |
type axi_data_store is access axi_data_array; | |
type axi_data_q is record | |
data : axi_data_store; | |
count : natural; | |
head : natural; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from setuptools.command import easy_install | |
def install_with_easyinstall(package): | |
easy_install.main(["-U", package]). | |
install_with_easyinstall('py2app') | |
import pkg_resources | |
easy_install.main( ['mymodule'] ) | |
pkg_resources.require('mymodule') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def snake_case | |
return downcase if match(/\A[A-Z]+\z/) | |
gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2'). | |
gsub(/([a-z])([A-Z])/, '\1_\2'). | |
downcase | |
end | |
"FooBar".snake_case #=> "foo_bar" | |
"HeadlineCNNNews".snake_case #=> "headline_cnn_news" | |
"CNN".snake_case #=> "cnn" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/sh | |
OPENOCD_VERSION=0.5.0 | |
D2XXLIB_SRC="CDM%202.08.24%20WHQL%20Certified" | |
D2XXLIB=CDM_20824 | |
OPENOCD=openocd-${OPENOCD_VERSION} | |
PREFIX=/opt/${OPENOCD} | |
PATH_DIR=/opt/openocd |
NewerOlder