This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
High performance filesystem scanner | |
(c) Parul Jain, 2016 | |
[email protected] | |
MIT License | |
*/ | |
package main | |
import ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
class Channel { | |
constructor(buffer) { | |
if (!buffer) this.buffer = 1 | |
else this.buffer = buffer | |
this.data = [] | |
this.putPromiseResolve = null | |
this.getPromiseResolve = null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
OlderNewer