Skip to content

Instantly share code, notes, and snippets.

View wikibook's full-sized avatar

위키북스 wikibook

View GitHub Profile
@wikibook
wikibook / GoogleDrivePublicURLGenerator.java
Created December 14, 2013 14:31
구글 드라이브에서 특정 디렉터리에 들어 있는 파일에 대한 직접 다운로드 링크 생성하기
java.io.File dir = new java.io.File("<path>");
for (java.io.File f : dir.listFiles()) {
String name = f.getName();
File body = new File();
body.setTitle(name);
body.setMimeType("<mimetype>");
FileContent mediaContent = new FileContent("<mimetype>", f);
File file = service.files().insert(body, mediaContent).execute();
@wikibook
wikibook / DropBoxPublicURLGenerator.java
Last active December 31, 2015 08:19
드롭박스에서 파일에 대한 직접 다운로드 링크 생성하기
DbxEntry.WithChildren listing = dbxClient.getMetadataWithChildren("/");
if (listing.entry instanceof DbxEntry.Folder) {
for (DbxEntry child : listing.children) {
String shareableUrl = dbxClient.createShareableUrl(child.path);
shareableUrl = shareableUrl.replace("www.dropbox.com", "dl.dropboxusercontent.com");
System.out.println(shareableUrl);
}
}
@wikibook
wikibook / learn_kr.lua
Last active February 27, 2025 01:15
learn lua 한국어판
-- 대시 두 개는 한 줄짜리 주석을 의미합니다.
--[[
[와 ]를 두 개씩 추가하면 여러 줄 주석이 됩니다.
--]]
----------------------------------------------------
-- 1. 변수와 흐름 제어
----------------------------------------------------