Link audio files in Google Drive folder in a Google Sheet

I have hundreds of audio files (.mp3) in a Google Drive folder that I need to list with links in a Google Sheet. Very similar to the problem described here, but I was not able to adapt the code to .mp3 files. The example code that I adapted:

function ListFldPdfs() {
  // replace FOLDER-ID with your folder's ID
  // replace SHEET-NAME with the name of the sheet that will hold the list
  var myPDFfolder = DriveApp.getFolderById('FOLDER-ID'); // replace FOLDER-ID with your folder's ID
  var thesheet = 'SHEET-NAME' // give a name to YOUR list sheet

  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var newPDFsheet = ss.getSheetByName(thesheet); 
     if (!newPDFsheet) { 
       ss.insertSheet(thesheet, 0); 
       var newPDFsheet = ss.getSheetByName(thesheet) ;
  Logger.log(SpreadsheetApp.getActiveSheet().getName());
     }
  // clear all existing content
  newPDFsheet.clear();
  // append the header row
  newPDFsheet.appendRow(( "Name", "VIEW", "HYPERLINK"));
  var results = ();
  // list all pdf files in the folder
  var mypdfs = myPDFfolder.getFilesByType('audio/mp3');
  // loop through found files in the folder
  while (mypdfs.hasNext()) { 
    var myfile = mypdfs.next(); 
    var fname = myfile.getName();
    var furl = myfile.getUrl();
    results = ( fname, furl, );
    //Logger.log("results = "+results); // for de-bugging
    newPDFsheet.appendRow(results); 
       } 
     var fcell = ss.getSheetByName(thesheet).getRange("C2"); 
               fcell.setFormula('=arrayformula(if(A2:A10="",,hyperlink(B2:B10,""&A2:A10&"")))'); 
}

This code effectively creates a new sheet in my Google Sheet with the columns Name, VIEW and HYPERLINK, but without listing the actual files in the original folder or providing links to see them. I appreciate any help on this.

themes – Best and Simple way to add Multiple CSS files and Files folder in WordPress

I have found an excellent way to css in wordpress theme. You would see this very easy step making your efforts very simple. You need only to use these method very simply.  
<?php
/**
 * Proper way to register and enqueue scripts and styles

* Must read this:-
*Note:- Import all CSS files in single stye.css file...
Use this method:- @import "style1.css"; @import "style2.css"; @import "style3.css"; and so on.
 */    
function random_name() {
    wp_register_style( 'mamies-wafers-bootstrap-min',  get_template_directory_uri() .'/css/bootstrap.min.css', array(), null, 'all' );
}
add_action( 'wp_enqueue_scripts', 'random_name' );
?>

windows 10 – Saving to renamed user folder

(This happened with a remote coworker)

He did the following (on Windows 10):

  1. Renamed C:UsersOriginalName to C:UsersDifferentName
  2. Moved (not copied) his files into the Documents folder (by clicking on Documents in the left bar in File Manager)
  3. Later named C:UsersDifferentName back to C:UsersOriginalName

We tried changing username values in HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionProfileList and (in an Administrator account) Computer Management(Local) -> Local Users and Groups.

We tried all four username permutations but still can’t access his files. Is there a way to retrieve them?

virtualbox – Local folder mounted as empty on Ubuntu with docker-machine

It appeared that docker-machine mounted my local /home to /hosthome by default.

Also using -v or --volume option for docker run has a difference to --mount option: local folder is automatically created if it doesn’t exist.

That’s why when calling docker run -v /home/a/b/c:/xxx, an empty folder was created at path /home/a/b/c inside virtual machine first, and then mounted to container at path /xxx.

First takeaway was to stop using -v option and start using --mount instead: docker run --mount type=bind,source=/home/a/b/c,target=/xxx. In this case the command will fail fast with error as the source path doesn’t exist in virtual machine.

Second step was to remove default shared folder from the virtual machine (my driver was virtualbox) and replace it with proper one with matching path. Performing these operations on stopped vm:

docker-machine stop
vboxmanage sharedfolder remove default --name hosthome
vboxmanage sharedfolder add default --name $HOME --hostpath $HOME --automount
docker-machine start

theming – Why Drupal 9 can use html.twig files outside the templates folder?

In the documentation (https://www.drupal.org/docs/theming-drupal/drupal-theme-folder-structure), they said :

Templates provide HTML markup and some presentation logic. Contrary to
Drupal 7, in Drupal 8 template files (*.html.twig files) must be
stored in the ‘templates’ subfolder.

But in my theme, I have a styleguide folder at the root & Drupal 9 find twig files in this folder.
For exemple:
mytheme/styleguide/components/10-atoms/form/input.html.twig

Drupal 9 will use this input.html.twig file despite it’s not in the mytheme/templates folder.

Windows 10 Lan – How to share a folder to only a specific computer

I have a lan network with a bunch of Windows 10 computers (PRO version 2004).
Each computer have a specific computer name and they all belong to the same workgroup.

One of the computers is our “storage computer” which contains multiple folders that are shared in the network (any computer can access to those folders).

I would like to share some of those folders only with one computer of the network. Is it possible at all? please could you advise me on how to achieve it?

Please note that I would like to avoid creating Microsoft accounts or windows login accounts with password (if possible).

Thanks in advance!

script – Powershell Transfer files under multiple subfolders to another folder under same Document Library Sharepoint

I have a document library “Documents1” which has multiple folders (aa, bb,cc, dd, Redundant).

Trying to write a powershell script to move files placed in multiple sub folders to folder “redundant” under the same doc lib.

The files to be moved needs to be read from a .txt file which contains list of files names present under various sub folders.

$WebURL="test.com"
 $SourceLibrary ="/Documents1"
 $TargetLibrary = "/Documents1/Redundant"
 $filenames = Get-Content 'F:usersfilelist.txt' 

#Get Objects $Web = Get-SPWeb $WebURL
 $SourceFile = $Web.GetFile($SourceLibrary) 
$Targetfile = $Web.GetFolder($TargetLibrary)
 foreach ($file in $filenames) { 
Get-ChildItem -Path $SourceFile -Recurse | Where-Object -FilterScript {($_.name -match $file)} | Move-Item -Destination $Targetfile 
Write-Output "File moved " $file 
}

external sd – Mounting portable SD card folder to internal folder (WhatsApp)

I am trying to mount WhatsApp media directory from portable SD to internal “SD”, as the phone internal storage is very limited.

My phone:
Sony Xperia XZ1 Compact (32GB internal storage, 128GB external SD card), Pie 9.0, stock image, bootloader unlocked, dm-verity, and SElinux enforcing. Magisk 20.1 (mount Namespace Mode= Global Namespace). bindfs v.1.14.2.

I have read and tried what is shown in these threads:

Output of /proc/filesystems

nodev   sysfs
nodev   rootfs
nodev   ramfs
nodev   bdev
nodev   proc
nodev   cpuset
nodev   cgroup
nodev   cgroup2
nodev   tmpfs
nodev   configfs
nodev   debugfs
nodev   tracefs
nodev   sockfs
nodev   pipefs
nodev   devpts
        ext3
        ext2
        ext4
        vfat
        msdos
nodev   ecryptfs
nodev   sdcardfs
        fuseblk
nodev   fuse
nodev   fusectl
        f2fs
nodev   pstore
nodev   selinuxfs
        texfat
nodev   functionfs

The last relevant lines of output from mount -r
….

/data/media on /mnt/runtime/default/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal)
/data/media on /storage/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal)
/data/media on /mnt/runtime/read/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_gid,default_normal)
/data/media on /mnt/runtime/write/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal)
/dev/block/sda60 on /mnt/qns type ext4 (rw,seclabel,nosuid,nodev,noexec,noatime,discard,data=ordered)
/dev/block/vold/public:179,1 on /mnt/media_rw/6534-3933 type texfat (rw,dirsync,nosuid,nodev,noexec,noatime,uid=1023,gid=1023,umask=0007,allow_utime=0020,utf8,min_prealloc_size=64k,max_prealloc_size=121910k,writeback_boundary=4M,readahead=4M,fail_safe,discard,hidden=show,errors=continue)
/mnt/media_rw/6534-3933 on /mnt/runtime/default/6534-3933 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,mask=6,nocache)
/mnt/media_rw/6534-3933 on /storage/6534-3933 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,mask=6,nocache)
/mnt/media_rw/6534-3933 on /mnt/runtime/read/6534-3933 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18,nocache)
/mnt/media_rw/6534-3933 on /mnt/runtime/write/6534-3933 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18,nocache)

The output of proposed command:

bindfs -u u0_a195 -g 9997 -p a-rwx,ug+rw,ug+X /mnt/media_rw/6534-3933/WhatsApp/Media /mnt/runtime/write/emulated/0/WhatsApp/Media

Gives me the following error:

fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option

I then add the nonempty string to the command, and then the external SD card directory mounts as “internal”.

The new lines from mount -r now reads:

/mnt/media_rw/6534-3933/WhatsApp/Media on /mnt/runtime/write/emulated/0/WhatsApp/Media type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
/mnt/media_rw/6534-3933/WhatsApp/Media on /storage/emulated/0/WhatsApp/Media type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
/mnt/media_rw/6534-3933/WhatsApp/Media on /mnt/runtime/default/emulated/0/WhatsApp/Media type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
/mnt/media_rw/6534-3933/WhatsApp/Media on /mnt/runtime/read/emulated/0/WhatsApp/Media type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)

WhatsApp does READ all the files correctly, however I cannot download anything new to the drive. This is frustrating as hell, as I have come to this stage before.
I just can seem to find out how to make WhatsApp being able to WRITE to the directory.

I have used apps like apps2sd, ts-bind, fbind, mount options. Anything under the sun. I can never reach a stage longer than WhatsApp being “tricked” to read from external SD, but never being able to write to external SD.

The only working solution, is not a viable solution, is to install experimental xposed, install old module xinternalSD, and magisk module “ExSDCard Access Enabler”. Then WhatsApp works perfectly, but I believe this is a very unstable for the rest of my system and my phone. And I would really like to have a more clean solution to this problem, like the one you are proposing.

Please assist in this great great headache.

Last note, also tried the command as given from your other post:

bindfs -o nosuid,nodev,noexec,noatime,context=u:object_r:sdcardfs:s0 -u 0 -g 9997 -p a-rwx,ug+rw,ugo+X --create-with-perms=a-rwx,ug+rw,ugo+X --xattr-none --chown-ignore --chgrp-ignore --chmod-ignore /mnt/media_rw/6534-3933/WhatsApp/Media /mnt/runtime/write/emulated/0/WhatsApp/Media

Same result after adding nonempty option, WhatsApp can read from external SD, but cannot write to it.

windows 10 – How do you delete the GameDVR folder in “C:UsersExampleAppDataLocalMicrosoft”?

This has been a nerve-racking problem: How can you possibly delete the GameDVR folder located at “C:UsersExampleAppDataLocalMicrosoft”??

The only file in that folder is a “KnownGameList.bin” folder that is completely useless to me!

It gives me an error that it is “being used by another process” which I believe is Windows Explorer. I’ve even tried safe mode with command prompt.

P.S. (Please DON’T ask me why I want to delete it. Rather, please provide a reply that explains why is it that Windows does not let you touch it at all, and if it’s essential to the system. I really don’t see how, though.)

Good luck.