Skip to content

Instantly share code, notes, and snippets.

View sregg's full-sized avatar

Simon Reggiani sregg

View GitHub Profile
@SimonGivre
SimonGivre / putIO-convert-to-MP4.js
Created August 30, 2012 09:47
put.io JS to convert into MP4 every file of folder
console.log($('.filelist .file-name .ftype:contains(video)').length + ' files to convert');
var cpt=0;
$('.filelist .file-name .ftype:contains(video)').each(function(){
var row = $(this).prev();
var id = row.attr('href').substring(row.attr('href').lastIndexOf('/')+1);
$.post('/v2/files/'+id+'/mp4',function(data){
console.log(data.status);
if(data.status=="OK") cpt++;
});
});
@patrickhammond
patrickhammond / EspressoTestRule.java
Last active September 2, 2018 12:14
Hacking through Espresso issues...
import android.app.Activity;
import android.app.Instrumentation;
import android.app.KeyguardManager;
import android.app.KeyguardManager.KeyguardLock;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.IBinder;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.support.test.InstrumentationRegistry;