Skip to content

Instantly share code, notes, and snippets.

View tamoxin's full-sized avatar

Marco Carrizales tamoxin

View GitHub Profile
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@kuyseng
kuyseng / gist:2792057
Created May 26, 2012 03:52
javascript: indesign get all files in folder
function get_folder_files(file_type, title, param_path) {
// v.0.1.2
var path = "";
if(!param_path) {
var tmp_file = File.openDialog(title, file_type);
if(!tmp_file) {exit(); };
path = tmp_file.path;
}else { path = param_path; };
var my_folder = new Folder(path);
@manfromanotherland
manfromanotherland / formspree.html
Last active July 30, 2021 07:05
JS: Ajax send forms using the most excellent Formspree » http://formspree.io #snippet
<form id="contact-form" action="//formspree.io/your@email.com" method="post">
<input type="text" name="Name" placeholder="Name" required>
<input type="email" name="Email" placeholder="Email" required>
<textarea name="Message" cols="30" rows="6" placeholder="Message" required></textarea>
<!-- CONFIG -->
<input class="is-hidden" type="text" name="_gotcha">
<input type="hidden" name="_subject" value="Subject">
<input type="hidden" name="_cc" value="email@cc.com">
<!-- /CONFIG -->
<input class="submit" type="submit" value="Send">
import android.content.Context;
import android.support.annotation.NonNull;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.data.DataFetcher;
import com.bumptech.glide.load.model.stream.StreamModelLoader;
@pollux-
pollux- / TLSSocketFactory.java
Created August 8, 2016 02:57
Attaching TLSSocketFactory to OkHttp
/**
* Enable TLS specific version V.1.2
* Issue Details : https://github.com/square/okhttp/issues/1934
*/
TLSSocketFactory tlsSocketFactory;
try {
tlsSocketFactory = new TLSSocketFactory();
httpBuilder.sslSocketFactory(tlsSocketFactory, tlsSocketFactory.systemDefaultTrustManager());