Skip to content

Instantly share code, notes, and snippets.

takp / file0.txt
Last active Apr 13, 2016
AWS Elastic Beanstalk、Nginx + Passenger (standalone)の環境設定 ref:
View file0.txt
$ passenger start --nginx-config-template nginx.conf.erb
deminoth / gist:6df889c0d5e35b9f4b54
Last active Apr 1, 2021
카카오 자바스크립트 SDK 비동기로드 asynchronously load Kakao Javascript SDK
View gist:6df889c0d5e35b9f4b54
window.kakaoAsyncInit = function() {
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); = id;
js.src = "";
var done = false;
js.onload = js.onreadystatechange = function() {
ghinda / object-to-form-data.js
Last active Jul 16, 2021
JavaScript Object to FormData, with support for nested objects, arrays and File objects. Includes Angular.js usage.
View object-to-form-data.js
// takes a {} object and returns a FormData object
var objectToFormData = function(obj, form, namespace) {
var fd = form || new FormData();
var formKey;
for(var property in obj) {
if(obj.hasOwnProperty(property)) {
if(namespace) {
andyburke / facebook-photo-post-javascript.js
Created Dec 19, 2011
How to post a photo to Facebook from client-side Javascript
View facebook-photo-post-javascript.js
// This bit is important. It detects/adds XMLHttpRequest.sendAsBinary. Without this
// you cannot send image data as part of a multipart/form-data encoded request from
// Javascript. This implementation depends on Uint8Array, so if the browser doesn't
// support either XMLHttpRequest.sendAsBinary or Uint8Array, then you will need to
// find yet another way to implement this. (This is left as an exercise for the reader,
// but if you do it, please let me know and I'll integrate it.)
// from:
if ( XMLHttpRequest.prototype.sendAsBinary === undefined ) {