cache control – Safari uses stale copy of a file

I have a javascript file which is frequently updated on the server (every hour). It is a plugin used in websites by the website’s users. It is served millions time a day.

In order for users to get the latest copy I use a header with:

cache-control: public,max-age=1800,stale-while-revalidate=3600, immutable

(Safari doesn’t support stale-while-revalidate so it is ignored).

When changing the file, all browsers catch up within one hour except than Safari, where small percent of users continue to use old version of the file (could be weeks old).
Seems it is caused by returning users (users which got into a website, than got back a week later).

Is there any reason why Safari is using an old version of the file though the max-age is set?

c# – What data structure works best with File Explorer-type applications?

I’m working on a desktop application in C# that reads a directory and displays in a DataGridView the directory entries of the PDFs found in that directory, like a File Explorer that only shows PDFs. The user will need to be able to rearrange the order of the files in the DataGridView by dragging and dropping (single row select, not multi). This reordering is not written to disk and is completely arbitrary, not by date or file name or anything like that. This is why the user reorders the files by dragging and dropping. After this, the user has the application process the PDFs in the rearranged order by looping through the rows of the DataGridView.

I had originally used a DataSet with a DataTable to store the directory contents. This DataTable is bound to the DataGridView with a BindingSource. I used this approach because it let me do a lot in the Visual Studio Designer. However, you can’t insert and remove elements from a BindingSource if its bound to a DataTable. You would have to do the inserting and removing at the DataTable, but there’s no way to insert a row at a specific location in a DataTable, so basically, I need a different kind of data source for my DVG.

Although Lists are not multicolumn, I know you can create an array of objects, one object per column, and store the array as a List entry. I know you could also use a Class or a Dictionary, but I don’t know the pros and cons of using each. Can you give a brief rundown of each?

What about not using an in-memory structure but instead use the DVG in unbound mode, programmatically adding the rows as each directory entry is read? Once the files are ordered as the user desires, whatever processing is done to them will be done with a loop that cycles through the DGV rows, not the rows in the DataSource. Everything I read encourages to use data sources with their DGVs, but is this a use case that calls for unbound mode?

wireshark – Redirecting an IP address to a local IP address, something akin to the hosts file?

I’m currently (legally) reverse engineering a game written in Java, so the client I have is a jar file.

I started Wireshark and started intercepting the traffic between the server and the client.
enter image description here

As you can see, the game’s server has an IP address of 151.xx.xxx.xxx

Although the game’s server doesn’t have a hostname, I tried converting its IP address to its hostname, the result was something like this nsXXXXX.ip-151-xx-xxx.net

My plan is to allow all the TCP traffic to first go through a proxy of mine (which is my other local machine 192.168.0.7) so that we can intercept, analyze and edit the traffic if necessary.

So I tried editing my hosts file. This is what I currently have:

   192.168.0.7    nsXXXXX.ip-151-xx-xxx.net 
   192.168.0.7    151.xx.xxx.xxx

Pinging that hostname fails and redirects to 192.168.0.7 just fine.
However, pinging 151.xx.xxx.xxx results in me still being able to receive packets and logging into the game.

I want to redirect that IP address to my other machine 192.168.0.7

On that machine, I’ll open the port it needs to connect to and let the traffic go to 151.xx.xxx.xxx

Is there a way to redirect 151.xx.xxx.xxx to 192.168.0.7, akin to what the hosts file does?

Thank you in advance.

File or PDF Submission to Top 10 file and doc or Pdf sharing sites manually for $1

File or PDF Submission to Top 10 file and doc or Pdf sharing sites manually

You Will Get 10 Dofollow Backlinks & Your Document stay on internet forever & People search for pdf on google and bing.

Sharing your pdf to top document sharing sites has a positive impact on google ranking and how google read/crawl important information regarding your brand and business . you can give me a document you created in TEXT/PDF/Word format. Then I will upload the document to 10 document sharing websites, like: scribd, docstoc, slideshare. Also, I will add an image to your document making it clickable as well as looking really nice and professional. You can provide your own document; just make sure you got all links, keywords etc. It is also a best SEO techniques to improve your site traffic, backlinks and ranking with White hat SEO technique in the Google, Bing, Yahoo etc Search Engines.

My Features and Guarantee

  • 100 Manual Submission.
  • All Links will be in public view.
  • I will try my best.
  • Fast Delivery.
  • No chance to spamming.
  • Usіng WНІТЕ НАТ ЅЕО Тесhnіquе
  • Ѕаfе wіth Gооglе Раndа & реnguіn Uрdаte
  • Total dominate over search Engine.
  • Indexing rate in amazing, most of the links get indexed within 10-15 days.

Benefits of uploading a document to share:


>>1 Best Way for Content syndication & Marketing

>> Get backlinks from PR9 to PR5 authority sites

>> Place Your Business at #1 Position in Google

If you’re looking for the Quality then this is the right place for you and Detailed report will be provided after completion of the work.

Please don’t hesitate to reach me if you have any questions.

.

linux – How to change the file system of a partition in a RAID 1?

First, sorry if the question has already been asked and correctly answered, I did not find anything that satisfies me.

I rent a dedicated machine in a datacenter, the machine run with a Debian 10 and has two drives in RAID 1, there are 3 partitions: one for the boot, one for the swap and one for the rest.

The third (/dev/md2) uses the ext4 file system and I would like to use XFS instead.

I am not used to changing the filesystem and this is the first time I have a machine with RAID so I do not know how to do it.

This is a new installation so there is no risk of losing data.

I tried a mkfs.xfs /dev/md2 but it didn’t work:

root@Debian-105-buster-64-minimal ~ # mkfs.xfs /dev/md2
mkfs.xfs: /dev/md2 contains a mounted filesystem

And I don’t know how it should be unmount/mount due to the RAID.

Thank you in advance for the help.

The df -Th command :

root@Debian-105-buster-64-minimal ~ # df -Th
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs   32G     0   32G   0% /dev
tmpfs          tmpfs     6.3G  516K  6.3G   1% /run
/dev/md2       ext4      437G  1.2G  413G   1% /
tmpfs          tmpfs      32G     0   32G   0% /dev/shm
tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs          tmpfs      32G     0   32G   0% /sys/fs/cgroup
/dev/md1       ext3      487M   53M  409M  12% /boot
tmpfs          tmpfs     6.3G     0  6.3G   0% /run/user/1000

the fdisk -l command :

root@Debian-105-buster-64-minimal ~ # fdisk -l
Disk /dev/nvme0n1: 477 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: SAMSUNG MZVLB512HAJQ-00000
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0289e0d1

Device         Boot    Start        End   Sectors   Size Id Type
/dev/nvme0n1p1          2048   67110911  67108864    32G fd Linux raid autodetect
/dev/nvme0n1p2      67110912   68159487   1048576   512M fd Linux raid autodetect
/dev/nvme0n1p3      68159488 1000213167 932053680 444.4G fd Linux raid autodetect


Disk /dev/nvme1n1: 477 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: SAMSUNG MZVLB512HAJQ-00000
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xbcb5c0d2

Device         Boot    Start        End   Sectors   Size Id Type
/dev/nvme1n1p1          2048   67110911  67108864    32G fd Linux raid autodetect
/dev/nvme1n1p2      67110912   68159487   1048576   512M fd Linux raid autodetect
/dev/nvme1n1p3      68159488 1000213167 932053680 444.4G fd Linux raid autodetect


Disk /dev/md1: 511 MiB, 535822336 bytes, 1046528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/md0: 32 GiB, 34325135360 bytes, 67041280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/md2: 444.3 GiB, 477076193280 bytes, 931789440 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

The mdstat :

root@Debian-105-buster-64-minimal ~ # cat /proc/mdstat
Personalities : (raid1) (linear) (multipath) (raid0) (raid6) (raid5) (raid4) (raid10)
md2 : active raid1 nvme0n1p3(0) nvme1n1p3(1)
      465894720 blocks super 1.2 (2/2) (UU)
      bitmap: 0/4 pages (0KB), 65536KB chunk

md0 : active (auto-read-only) raid1 nvme0n1p1(0) nvme1n1p1(1)
      33520640 blocks super 1.2 (2/2) (UU)
        resync=PENDING

md1 : active raid1 nvme0n1p2(0) nvme1n1p2(1)
      523264 blocks super 1.2 (2/2) (UU)

unused devices: <none>

email – Attach a file to gmail directly from Sharepoint (no outlook client – no onedrive synch)

is there a way to attach a file straight (not download and upload) from Sharepoint site using a gmail email and with no third party app?
For many reason I can’t use the following method:

  • synch sharepoint with one
  • use outlook client or using the office 365 outlook email

I found a sort of solution, but then the sharepoint website remains open from the gmail account also if I log out from everything and enter with a different gmail address, so I’m not so happy with this.
My way was, when attaching a file, putting the website address in the name field, log in and then it shows all the folders.

These attachment are for external and must be a copy of the file. They are sent on random occasion, so it’s not an automated process (so i think I can’t use flow).

Thank you for your attention

nginx – Security-wise file ownership & permission setup for LEMP server to be managed via wp-cli and wordpress dashboard?

I’m on a LEMP VPS with the following setup;

cd /home/$USER/public/myDomain.com        # change directory to myDomain.com
chown -R nginx:nginx .                    # change file ownership
find . -type d -exec chmod 750 {} ;      # change permissions for directories
find . -type f -exec chmod 640 {} ;      # change permissions for files
chmod 400 wp-config.php                   # change permission for wp-config

The problem is I cannot get into “myDomain.com” folder without logging in as root. And also, I cannot run wp-cli as $USER, I have to run as follows;

sudo -u nginx wp <wp-command>             # running wp-cli as user `nginx`

So, as the title says, what is the security-wise setup for file ownership & permission in a LEMP VPS.

Microsoft Outlook .pst file equivalent for the Thunderbird Mail Client?

Thunderbird is installed MacOS: 5+ email accounts.

The goal is to export one of the G-mail account’s for a third party to analyze in a Windows instance of Thunderbird. Once the emails are exported to a single data file, I would like to reduce the emails so as to ensure that analyst time is not wasted.

Is there an equivalent of a Microsoft Outlook .pst file for the Thunderbird Mail Client and where is it found?

I understand that the profile data is stored in:

open ~/Library/Thunderbird/Profiles

but unsure if the G-mail messages are contained in the profiles directory.

I seek to avoid copying and sharing the G-mail login credential and would like to avoid exporting this information.

I want to fit 2KB file in QR code but i don’t know how

I have 2kb .MP3 file and I’ve read QR code can fit 3kb, so I wanted to fit mp3 file onto code just because i want to. Is there any way to do it?

How to push a file to internal storage?

I want to do this step to root my phone:
Copy it to the internal storage of your device

So the command is:

adb push <local file> <remote location>

The "local file" is "boot.img"
What is name for my phone’s "internal storage"?