Skip to content

Instantly share code, notes, and snippets.

/*
High performance filesystem scanner
(c) Parul Jain, 2016
paruljain@hotmail.com
MIT License
*/
package main
import (
$ie = New-Object -ComObject InternetExplorer.Application
$ie.Visible = $true
$ie.Navigate2('http://www.oshoworld.com/discourses/audio_hindi.asp?album_id=30')
while ($ie.Busy) { sleep -Milliseconds 50 }
$start = 117
$end = 121
for ($i = $start; $i -lt $end; $i++) {
$ie.Refresh()
while ($ie.Busy) { sleep -Milliseconds 50 }
@paruljain
paruljain / vagrantfile
Created February 13, 2017 22:43
Vagrantfile for Alpine Linux with docker
Vagrant.configure("2") do |config|
config.vm.box = "maier/alpine-3.3.1-x86_64"
config.vm.network "public_network", ip: "192.168.1.31", auto_config: true
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.provider "virtualbox" do |vb|
vb.name = 'Alpine1'
vb.cpus = 1
vb.memory = 1024
#vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
# Display the VirtualBox GUI when booting the machine
@paruljain
paruljain / vagrantfile
Created February 14, 2017 15:34
Vagrantfile for 3 Alpine Linux VMs with Minio Server
Vagrant.configure("2") do |config|
(1..3).each do |i|
config.vm.define "node-#{i}" do |node|
node.vm.box = "maier/alpine-3.3.1-x86_64"
node.vm.synced_folder ".", "/vagrant", disabled: true
node.vm.network "public_network", ip: "192.168.1.3#{i}", auto_config: true
node.vm.provider "virtualbox" do |vb|
vb.name = "Alpine#{i}"
vb.cpus = 1
vb.memory = 1024
// Include the libraries we need
#include <OneWire.h>
#include <DallasTemperature.h>
#include <Ticker.h>
Ticker temperatureTicker;
// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS D2
// Include the libraries we need
#include <OneWire.h>
#include <DallasTemperature.h>
#include <Ticker.h>
#include <ESP8266WiFi.h>
#include <EEPROM.h>
#include <PubSubClient.h>
#include <stdlib.h>
//Global variables
'use strict'
const fs = require('fs'),
path = require('path')
exports.scan = function(folder) {
if (!folder) return
const stats = fs.statSync(folder)
if (!stats.isDirectory()) throw new Error(`${folder} is not a directory`)
const self = this
'use strict'
class Channel {
constructor(buffer) {
if (!buffer) this.buffer = 1
else this.buffer = buffer
this.data = []
this.putPromiseResolve = null
this.getPromiseResolve = null
import queue
from os import scandir
from os.path import join
from threading import Thread
import time
# Number of concurrent copy operations
MAX_THREADS = 30
# Queue of files to copy to s3
from aws_request_signer import AwsRequestSigner, UNSIGNED_PAYLOAD
import requests
import queue
from os import scandir
import os
from urllib.parse import quote
from os.path import join
import time
from threading import Thread