sneakernet | offline campus filesharing network to distribute gigabyte | Encryption library
kandi X-RAY | sneakernet Summary
kandi X-RAY | sneakernet Summary
sneakernet
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create a new cache entry
- Determine whether the given user can perform
- Check the content of the cache
- Determine if the content of a content copy can be purged
- Send reset code
- Reset user
- Generate file id
- Invite a user
- List all users
- Invite a person
- Update the cache
- Get a copy of a file
- Sync a cached cache
- Perform a POST request
- Fulfill all request copies
- Update an existing content
- Post the user
- Handle POST request
- Return a list of files that match the request
- Gets the response
sneakernet Key Features
sneakernet Examples and Code Snippets
Community Discussions
Trending Discussions on sneakernet
QUESTION
I have setup a private wiki (1.35.1) running on Ubuntu Mate which is a guest OS on VMWare Workstation 16. I'd like to run this wiki at 2 locations (A & B) that are isolated (no VPN connection). I will be the only user accessing since it is my private wiki.
I've got the wiki setup and running at location A and will simply archive the guest and bring it up at location B as an identical copy.
Question: After I spend the day at location A (editing my wiki there), can i just simply copy the entire /var/www/html/Mediawiki
folder and the entire /var/lib/mysql
folder (MariaDB) onto a thumb drive and dump onto location B?
The intent is for these to be identical wiki's - synchronized by me (sneakernet) with thumb drive.
UPDATE - this is working well so far. Below is how i do it.
- Stop the mysql server -
sudo service mysql stop
- Copy (using rsync) all new or changed files from
/var/lib/mysql/
to my external share with:sudo rsync -cavurt --delete --info=del,name,stats2 "/var/lib/mysql/" "/home/rp/shares/VM_share_ubuntu/wiki_sql_files"
- Copy all new or changed files from
/var/www/html/mediawiki-1.35.1
to my external share with:sudo rsync -cavurt --delete --info=del,name,stats2 "/var/www/html/mediawiki-1.35.1/" "/home/rp/shares/VM_share_ubuntu/wiki_mediawiki_files"
- Start the mysql server -
sudo service mysql start
Now, copy the new/changed files to the 2nd machine:
- Stop the mysql server -
sudo service mysql stop
- Copy in (using rsync) all new or changed mysql files with:
sudo rsync -cavurt --delete --info=del,name,stats2 "/home/rp/shares/VM_share_ubuntu/wiki_sql_files/" "/var/lib/mysql"
- Copy in all new or changed mediawiki files with:
sudo rsync -cavurt --delete --info=del,name,stats2 "/home/rp/shares/VM_share_ubuntu/wiki_mediawiki_files/" "/var/www/html/mediawiki-1.35.1"
- Start the mysql server -
sudo service mysql start
In those rsync commands note that the end of the source folder needs to be /
and the target folder does NOT have the ending /
. The significance of that is explained in this thread.
ANSWER
Answered 2020-Dec-19 at 03:48This would mostly work as long as you set $wgServer dynamically. Pages that use absolute URLs and are loaded from cache would link to the wrong URL, but that should be very rare - almost everything uses relative URLs.
QUESTION
I am expanding on work done by another developer, and was given their existing code base over sneakernet. I started working on my local machine before the Git repository for the project was set up. Now, after getting access to the repository, I've cloned the repository to my local machine, set up my feature branch, added my changes to that directory, and have pushed my changes to the origin.
However, when I switched back to IntelliJ IDEA to continue working, it doesn't recognize that the project is now using Git. Where I would normally expect to see my branch name, it just says "N/A". How do I get IntelliJ to recognize that my project is a Git project now?
...ANSWER
Answered 2019-Mar-08 at 18:30The problem
There are a few problems here that created the issue:
The previous developer wasn't using IntelliJ IDEA, so there was no existing settings directory telling the IDE about the VCS setup
The original project directory wasn't used, but was instead copied from, and the pulled directory became the new project root
The original project directory wasn't under VCS, so IntelliJ didn't know to even look for the branch name
The fix
In the toolbar menu, select VCS > Enable Version Control Integration
, and in the popup window, select Git
. Now all of the Git features you would expect to see are working.
QUESTION
If I have a repository that contains submodules, and I want to make a bundle for sneakernet, how do I make the bundle include the objects needed to update the submodules?
For example, let's say I have a repository called parent
and it contains a submodule called submod
. I want to create a bundle that contains all the recent work since commit basecommit
, so naturally, from inside the parent
root directory I would do:
ANSWER
Answered 2018-Mar-16 at 18:50How do I create the bundle file such that all those objects from the submodule repos are also included.
You can't. A bundle file is specific to a Git repository. A submodule is simply a link to another Git repository, so you must create a separate bundle for the separate Git repository. (You can then make an archive out of the various bundles.)
It's pretty clear that Git could descend into each submodule and run git bundle
in each such one, making these various files for you. The arguments to pass to the sub-git bundle
commands are tricky, though. You will have to write your own script and use git submodule foreach
to get it to run in each submodule, and have your script figure out the parameters to use.
You will then probably want to package together each bundle (presumably into a tar or rar or zip or whatever archive) for transport and unbundling / fetching. You'll want another git submodule foreach
during the unbundling, which will probably be even more annoying since ideally this should use the new set of submodules (after unbundling the top level one and selecting an appropriate commit).
It's possible that someone has written scripts to do this, but if so, I don't know of it. It's not included in Git itself—bundles themselves are kind of klunky and non-mainstream-y.
QUESTION
I'm having issues reaching the public Github site (github.com) using existing tools in my workflow (Visual Studio Git, Git Extensions), due to firewall/proxy rules I haven't been able to straighten out yet.
In the meantime, I'd like to manually replicate the Github repo locally. I'm hoping there is a way to do this that I'm just missing (with the ZIP download?) I realize there are also Git commands to create patches (git-format-patch and git-bundle, see this answer), but I don't see any way to create those on the Github website. When I grab the download .zip file, there is no .git folder - maybe I don't need that?
Question: Is there a way to manually replicate a Github.com Git repository on a local PC, without using the cloning options?
I tried creating a bare repository using Git Extensions, so I already have a .git folder - can I just dump the contents of the zip into that folder? I'm concerned because I want to pull in a branch other than master, and I can see some of the files in .git reference master currently, and this also likely wouldn't have references to all the branches (though that might not matter).
I believe I need the git patch or bundle files, but not sure how to create those on Github. I could do that from my personal PC outside the firewall and use sneakernet, but it should be possible to just pull down from Github - right?
Note: I can get to the Github.com website, just cannot complete cloning through the tools properly, likely because they are not logged into our authenticator (i.e. through SAML/SSO). I tried using oauth, etc. but it's not working directly. Regardless - there should be a way to complete a manual clone, and I'd like to understand how to do that.
...ANSWER
Answered 2017-Sep-06 at 01:38This is similar to a situation I ran into consulting with a company when managing code intended for a cluster of machines that could not be connected to the network.
You will need a total of three repositories:
QUESTION
I have an existing Rails 4 application in which I use Carrierwave to handle attaching Office docs. Carrierwave is backed by Azure blob storage. It's worked wonderfully for several months.
Recently, someone in IT created an account in the application, under a different name, and has discovered that you can download a file from the (public) blob container, though a plain web browser, as long as you know the exact 200-character-or-so path and filename combination. To me, this is no worse than files leaving the network via sneakernet, but, of course, this situation has been deemed an untenable security risk of vital company information.
I've been trying to figure out a way to get my attachment controller to download the file for me, and serve it to the browser, so that I can turn off the public access to the blob container. Carrierwave should understand how to download that file, securely, as it already has been configured with the location, host, and security key, but, for the life of me, I can't figure out how I might call some method in the library to do this.
The closest I've gotten is this module, which seems promising, but I can't figure out how to invoke it in a useful way. It still wants to deal with the file through a public-type URL.
I've also tried creating a Tempfile, writing it, and send_file-ing it, but it only seems to serves an html file with an error message about not being able to access the temp file.
...ANSWER
Answered 2017-May-12 at 11:52There were 2 problems with my code, above. First, in debugging, I noticed that there was a name collision with using f
as the temp file variable name. (Something to do with Kernel.)
Second, the way the action is being rendered, the file isn't being sent at the moment the send_file
method is called. It actually passes through some more Rails hoops before that. So I can't clean up the file right after that line, or the file doesn't exist to send to the client when Rails is finally done with the render. (I shouldn't have to clean up the file anyway, as Tempfile is designed to put files in places that get cleaned up by the system.)
So this works:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sneakernet
You can use sneakernet like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page