This file contains 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
# Makefile template for a shared library in C | |
# https://www.topbug.net/blog/2019/10/28/makefile-template-for-a-shared-library-in-c-with-explanations/ | |
CC = gcc # C compiler | |
CFLAGS = -fPIC -Wall -Wextra -O2 -g # C flags | |
LDFLAGS = -shared # linking flags | |
RM = rm -f # rm command | |
TARGET_LIB = libtarget.so # target lib | |
SRCS = main.c src1.c src2.c # source files |
This file contains 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
# Makefile template for executable | |
CC = gcc # C compiler | |
CFLAGS = -Wall -Wextra -O2 -g # C flags | |
LDFLAGS = # linking flags | |
RM = rm -f # rm command | |
TARGET = program # target lib | |
SRCS = main.c \ | |
src1.c \ |
This file contains 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
export PS1='${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\$ ' |
This file contains 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
#!/bin/env python | |
# plot scatter graph for ascii data | |
# | |
# The file is read from stdin. | |
# | |
# data format: | |
# | |
# x0 y0 | |
# x1 y1 |
This file contains 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
\documentclass{article} | |
\usepackage{CJK} | |
\usepackage{indentfirst} | |
\usepackage[CJKbookmarks]{hyperref} | |
\usepackage{float} | |
\usepackage{amsmath,bm} | |
\usepackage{url} | |
\usepackage{graphicx} | |
\setlength{\parindent}{2em} |
This file contains 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
#!/bin/env python | |
import matplotlib.pyplot as plt | |
import getopt | |
import sys | |
try: | |
opts, args = getopt.getopt(sys.argv[1:], 'x:y:') | |
except: |
This file contains 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
export PS1='%n@%M:%~%% ' |
This file contains 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/env ruby | |
# test liquid | |
# | |
# Usage: | |
# | |
# ruby test_liquid.rb template | |
# | |
# e.g. | |
# |
This file contains 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
" Find python interp. If found, return python command; if not found, return '' | |
function! FindPythonInterp() | |
if has('unix') | |
let l:searching_list = [ | |
\ 'python', | |
\ 'python27', | |
\ 'python26', | |
\ 'python25', | |
\ 'python24', | |
\ '/usr/local/bin/python', |
OlderNewer