Skip to content

Instantly share code, notes, and snippets.

khris

Block or report user

Report or block khris

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@khris
khris / gist:4664150
Last active Dec 11, 2015
Cookie synchronization between WebView and HttpClient
View gist:4664150
CookieManager cookieManager = CookieManager.getInstance();
BasicCookieStore cookieStore = new BasicCookieStore();
final String appDomain = mContext.getResources().getString(R.string.app_domain);
String cookies = cookieManager.getCookie(appDomain);
String[] splitCookies = cookies.split(";");
for (String cookie : splitCookies) {
String[] cookieParts = cookie.split("=");
if (cookieParts.length > 0) {
String cookieValue = "";
if (cookieParts.length >= 2) {
View main.js
/**
*
* It's under MPL 1.1
* See http://www.mozilla.org/MPL/1.1/
* You can install this from https://addons.mozilla.org/ko/firefox/addon/naver-endic/
*
*/
let { Ci, Cc } = require("chrome");
let Panel = require("panel").Panel;
@khris
khris / gist:2910153
Created Jun 11, 2012
fucking php gettext with js for gedit3
View gist:2910153
d=window.get_active_document();s,e=d.get_selection_bounds();t=d.get_text(s,e,True);d.delete_selection(False,False);d.insert_at_cursor(''.join(("<?=_('",t,"')?>")))
You can’t perform that action at this time.