Instantly share code, notes, and snippets.

View CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
View build.gradle
apply plugin: 'java'
apply plugin: 'application'
mainClassName = 'test.Hello'
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
View build_opencv.sh
#!/usr/bin/env bash
OPENCV_DIR=../../src
INSTALL_DIR=$HOME/adas/3rdparty
TEST_OPTS="-DBUILD_TESTS=OFF \
-DBUILD_PERF_TESTS=OFF \
-DBUILD_EXAMPLES=OFF"
PKG_OPTS="-DWITH_OPENEXR=OFF \
View check_unity.c
#include <stdio.h>
#include <string.h>
int check_unity(const char *filename)
{
FILE *f = fopen(filename, "rb");
const char *s = "UnityPlayer";
char buf[20];
int len = strlen(s);
int is_unity = 0;
View acm.coffee
#!/usr/bin/env phantomjs
fs = require 'fs'
webPage = require 'webpage'
system = require 'system'
printDoi = (url, remains) ->
page = webPage.create()
redirectURL = null
View pdftitle.py
#!/usr/bin/env python
"""
Extract title from PDF file.
Depends on: pyPDF, PDFMiner.
Usage:
find . -name "*.pdf" | xargs -I{} pdftitle -d tmp --rename {}
View csv2json.py
#!/usr/bin/env python
import csv
import json
import sys
if __name__ == "__main__":
if len(sys.argv) != 2:
print "Usage: %s input" % sys.argv[0]
sys.exit(1)
View org-syntax-cheatsheet.org

Markup Cheat sheet for Org-mode

Heading 1

Heading 2: Set a deadline and a schedule

[66%] Heading 3: a list with checkboxes

  1. [x] task 1
  2. [X] task 2
  3. [x] task 3