Skip to content

Instantly share code, notes, and snippets.

@larryxiao
larryxiao / tips.md
Created May 11, 2014 12:13
Something about Mac OS X
@larryxiao
larryxiao / Makefile
Last active August 29, 2015 13:57
CUDA / OpenCL ready Solid Classes
all:
nvcc -gencode arch=compute_20,code=sm_20 GPU_solid.cu

Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.

Ruby

import random
class Markov(object):
def __init__(self, open_file):
self.cache = {}
self.open_file = open_file
self.words = self.file_to_words()
self.word_size = len(self.words)
self.database()
@larryxiao
larryxiao / watchop.py
Last active December 27, 2015 15:19 — forked from pocketwalker/watchop.py
#!/usr/bin/python
#coding=utf-8
from bs4 import BeautifulSoup
import sys, re
import urllib, urllib2
import xml.etree.ElementTree as ET
import webbrowser
#import codes, Queue, threading, time
def spider(net):
@larryxiao
larryxiao / gist:6848069
Created October 6, 2013 01:10
finding files recursively then copy to destination folder
find $directory -type f -name \*.in
-exec cp {} /home/destination/folder \;
@larryxiao
larryxiao / * - pdf
Last active October 18, 2017 08:56
extract text from pdf then remove unnecessary characters change '\n' into '||' change \f' into ' '
libreoffice --convert-to pdf *.ppt
libreoffice --headless --convert-to pdf *.ppt