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/bash | |
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
appify v3.0.1 for Mac OS X - http://mths.be/appify | |
Creates the simplest possible Mac app from a shell script. | |
Appify takes a shell script as its first argument: | |
`basename "$0"` my-script.sh |
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/bash | |
# cpu information | |
cat /proc/cpuinfo | |
# memory information | |
cat /proc/meminfo | |
# kernel information | |
cat /proc/version |
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
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter | |
from pdfminer.converter import TextConverter, HTMLConverter | |
from pdfminer.layout import LAParams | |
from pdfminer.pdfpage import PDFPage | |
from cStringIO import StringIO | |
def convert_pdf_to_txt(path): | |
rsrcmgr = PDFResourceManager() | |
retstr = StringIO() | |
codec = 'utf-8' |
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
import sys | |
import re | |
import io | |
import gzip | |
from urllib.request import urlopen | |
from urllib.request import Request | |
from bs4 import BeautifulSoup | |
def getLinks(pageUrl): | |
bs = urlopen(Request(pageUrl, headers={"User-Agent": "Mozilla/5.0 (X11; U; Linux i686) Gecko/20071127 Firefox/2.0.0.11", "Accept-Encoding": "gzip"}) ).read() |
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
using UnityEngine; | |
using System.Collections; | |
using UnityEngine.EventSystems; | |
using System.Collections.Generic; | |
using UnityEngine.UI; | |
public class CardboardModeMgr : MonoBehaviour { | |
// We need a reference to camera which | |
// is how we get to the cardboard components. |
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/python | |
# | |
''' | |
Version : 0.1 | |
Author : Arian Pasquali | |
Summary : This program loads comments from facebook object | |
''' | |
from facepy import GraphAPI | |
import json; |
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
___ _ _ | |
___ ___| _|_|___ ___| |_ _ _ _ ___ ___ _____ | |
|_ -| . | _| | .'| | | | | |_| _| . | | | |
|___|___|_| |_|__,|_|_|_|_|_____|_|___|___|_|_|_| |
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
https://github.com/may-day/olap | |
http://bkanuka.com/articles/python-connect-to-olap/ | |
http://mondrian.pentaho.com/documentation/installation.php | |
https://github.com/olap4j/olap4j | |
http://stackoverflow.com/questions/3793215/query-olap-mondrian-mdx-xmla-with-a-python-interface | |
https://research.cip.cgiar.org/docs/mondrian/Tutorial_Mondrian.pdf | |
http://lists.pentaho.org/pipermail/mondrian/2014-October/004999.html | |
http://maxrohde.com/2011/04/27/large-war-file-cannot-be-deployed-in-tomcat-7/ | |
http://pentaho.dlpage.phi-integration.com/mondrian/mysql-foodmart-database | |
https://github.com/ThoughtWorksInc/mondrian-xmla-spike |
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
server { | |
listen 80; | |
root /var/www/html/data; | |
location /images/ { | |
#Enabling the sendfile directive will eliminate the step of copying the data into the buffer and enables direct copying data from one file descriptor to anothers | |
sendfile on; | |
#To prevent one fast connection to entirely occupy the worker process, you can limit the amount of data transferred in a single sendfile() call by defining the sendfile_max_chunk directive | |
sendfile_max_chunk 1m; | |
#Use the tcp_nopush option together with sendfile on;. The option will enable NGINX to send HTTP response headers in one packet right after the chunk of data has been obtained by sendfile |
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
import os, hashlib, urllib2, optparse | |
def get_remote_md5_sum(url, max_file_size=100*1024*1024): | |
remote = urllib2.urlopen(url) | |
hash = hashlib.md5() | |
total_read = 0 | |
while True: | |
data = remote.read(4096) | |
total_read += 4096 |
OlderNewer