Skip to content

Instantly share code, notes, and snippets.

View javayhu's full-sized avatar
🚀
Indie Hacking

javayhu javayhu

🚀
Indie Hacking
View GitHub Profile
@tylerchesley
tylerchesley / gist:6198074
Created August 9, 2013 23:10
Function to recursively copy files from an Android asset directory
public void copyFileOrDir(String path) {
AssetManager assetManager = this.getAssets();
String assets[] = null;
try {
assets = assetManager.list(path);
if (assets.length == 0) {
copyFile(path);
} else {
String fullPath = "/data/data/" + this.getPackageName() + "/" + path;
File dir = new File(fullPath);
@javayhu
javayhu / edx-platform installation problem
Last active December 19, 2015 21:08
Here is the problem I met with when I tried to install edx-platform on Mac OS X 10.7. The edition of edx-platform I used is the latest which released on July 17th.When I met with the error saying "chmod +x /tmp/vagrant-shell && /tmp/vagrant-shell", I tried "sudo -H bash -l" and run "chmod +x /tmp/vagrant-shell && /tmp/vagrant-shell" again, it we…
Last login: Wed Jul 17 09:21:15 on console
HuJiaWeis-MBP:~ hujiawei$ cd Techs/edx
HuJiaWeis-MBP:edx hujiawei$ ls
edx-installation.txt tools
HuJiaWeis-MBP:edx hujiawei$ git clone 39% (68609/172542), 43.18 MiB | 38 KiB/s
-bash: syntax error near unexpected token `('
HuJiaWeis-MBP:edx hujiawei$ git clone git://github.com/edx/edx-platform.git
Cloning into 'edx-platform'...
remote: Counting objects: 172542, done.
remote: Compressing objects: 100% (54979/54979), done.
var gistPrefix = 'https://gist.github.com/',
// Cache document.write so that it can be restored once all Gists have been
// embedded.
cachedWrite = document.write,
body = $('body'),
// Map each p.gist to an object that contains the paragraph to be replaced
// and the Gist's identifier.
gists = $('a.gist').map(function(n, a) {
a = $(a);
var href = a.attr('href');