Skip to content

Instantly share code, notes, and snippets.

@rzrbld
rzrbld / Seagate_Central_Replace_HDD.md
Last active May 30, 2023 20:35
Seagate Central Replace HDD

let's suppose you don't have any drive in Seagate Central first of all you need to check if board is ok (you can pass this step an go to Phase 4. if you already know it)

Phase 1 (serial tty)

pre requests

  1. usb-to-tty or Arduino
  2. Screwdriver and card

steps

  1. find J2 connector on board. If sata connector look at the left, and ethernet port look at you - j2 connector is on right of the board and look like this:
@rzrbld
rzrbld / tellmeyoursecrets.js
Last active November 25, 2020 20:29 — forked from woodwardtw/tellmeyoursecrets.js
google script that lists a lot of info about the files in a particular folder/sub folder structure including viewers, editors, and sharing permissions
function listFolders(folder) {
var sheet = SpreadsheetApp.getActiveSheet();
sheet.appendRow(["Name","Folder Name" ,"Sharing Access", "Sharing Permission", "Get Editors", "Get Viewers", "Date", "Size", "URL", "Download", "Description", "Type"]); //writes the headers
// var folder = DriveApp.getFolderById("ID");//that long chunk of random numbers/letters in the URL when you navigate to the folder
var folders = DriveApp.getFolders();
while (folders.hasNext()) {
var folder = folders.next();
Logger.log(folder.getName());
@rzrbld
rzrbld / How-to-git-WD-MyCloud-Mirror.md
Last active September 18, 2017 23:11
How to install git or other apps on WD MyCloud Mirror

You got WD MyCloud Mirror or so, and you don't have some 3rd party apps - like GIT\Antivirus and etc. If you just take an app from other model, like WD MyCloud EX2 and try to install it on WD MyCloud Mirror you'll see: "Failed to install blah-blah-blah" - FAIL! But!

first of all you need some device,file and tool:

  1. WD MyCloud Mirror.
  2. App that you need from other model. it my case - it's GIT - http://downloads.wdc.com/apps/WDMyCloudEX2/git/WDMyCloudEX2_git_1.40.bin
  3. Hex Editor - WinHex\wxHex\you name it

how to make this works:

@rzrbld
rzrbld / ssh-loop-remove.sh
Last active September 2, 2021 09:54
bash script to ssh multiple servers in a loop
#!/bin/bash
for server in $(cat hosts.txt); do
IP=`echo "$server" | awk 'BEGIN {RS = "|"}; END {print $1}'`;
HOST=`echo "$server" | awk 'BEGIN {FS = "|"}; END {print $1}'`;
USER=`echo $HOST | sed 's/tst-centos-//g;s/\-.//g;'`;
echo "$HOST($IP)"
echo $USER
ssh -nt $USER@$IP -i ssh/$USER 'sudo yum -y remove test-pkg && sudo rm -rf /var/lib/test'
done
@rzrbld
rzrbld / bash-artifactxml-gen.sh
Created March 20, 2014 21:09
wso2 studio developer artifact.xml generator
#!/bin/bash
# using: bash-artifactxml-gen.sh my.project.folder
#
ROOTFOLDER=$*
#set src dir
SRCDIR=$ROOTFOLDER'/src/';
#cd to src dir
cd $SRCDIR;
#start gen artifact.xml
echo '<?xml version="1.0" encoding="UTF-8"?><artifacts>';