Skip to content

Instantly share code, notes, and snippets.

View Acconut's full-sized avatar

Marius Acconut

View GitHub Profile
@Acconut
Acconut / index.js
Created May 21, 2017 10:32
requirebin sketch
var Uppy = require('uppy')
var Transloadit = require('uppy/src/plugins/Transloadit')
var uppy = new Uppy.Core({wait: false, debug: true})
uppy
.use(Transloadit, {
params: {
steps: {
"screenshot": {
"robot": "/html/convert",

lockfile

Handle locking via pid files.

Attention: This is a fork of Ingo Oeser's amazing work whose behavior differs a bit. While the original package allows a process to obtain the same lock twice, this fork forbids this behavior.

[![Build Status Unix][1]][2] [![Build status Windows][3]][4]

// with leading = true and trailing = false
function throttle(func, wait) {
func();
setTimeout(function() {
throttle(func, wait);
}, wait);
}
// with leading = false and trailing = true
function throttle(func, wait) {
type UploadURL *net.URL
type UploadInfo struct {
Size int64
Offset int64
Metadata map[string]string
IsPartial bool
IsFinal bool
PartialUploads []string
}
@Override
public void onClick(View v) {
Class<?> activity = null;
switch(v.getId()) {
case R.id.myprojects_button:
activity = MyProjectsActivity.class;
break;
case R.id.projectsupport_button:
activity = ProjectSupportActivity.class;
#![feature(read_exact)]
use std::fs::File;
use std::io::Read;
use std::mem::transmute;
#[derive(Debug)]
struct RawEvent {
time_a: i64,
time_b: i64,
var cluster = require("cluster");
var http = require("http");
if(cluster.isMaster) {
cluster.fork();
cluster.fork();
testConnection();
setInterval(testConnection, 1000);
} else {
var cluster = require("cluster");
var http = require("http");
if(cluster.isMaster) {
cluster.fork();
testConnection();
setInterval(testConnection, 1000);
} else {
var server = http.createServer(function(req, res) {
composer := NewComposer()
composer.UseCore(s3store)
composer.UseTerminator(s3store)
composer.UseFinisher(s3store)
composer.UseGetReader(s3store)
composer.UseConcater(s3store)
composer.UsesLocker(consulLocker)
if! $ORIGINAL.size < 20971520 && $ORIGINAL.meta.duration < 300 {
$flash_video = /video/encode(
use: $ORIGINAL,
result: true,
preset: "flash",
width: …
)
$iphone_video = /video/encode(
use: $ORIGINAL,