there is a file that i'm working with and the issue is that I want to find where in the entire react app are the instances where the logo file is called. Is there a way to do this?
I've tried finding the direct file path of the svg image
You can do Edit, Find in Files (or Ctrl+Shift+F ) default key binding, Cmd+Shift+F on MacOS) to search the Currently open Folder.
Related
I have a psd file provided by a designer.
I would like to use this psd file as a template to generate images.
I tried to use psd.js to make the changes in a react application. I successfully read the file, parsed it and found the text layer I was searching for but i wasn't able to change the text and generate an image with my changes.
What I'm trying to achieve is to have a website where a user can directly update the text and export the result into an image.
Do you have any idea how I can achieve this ?
Is there way, in Atom, to open files that are mentioned in comments?
When I edit a code file, there are often other code files of interest that I may want to also open while working on that file. Sometimes these reference files are miles away and require numerous steps of navigation to open them via the left-pane tree structure.
I was thinking, it would be nice if I could put relative file paths into javascript comments in a manner that atom would understand that if I click that path it should open that file in a new tab.
I suspect this isn't an original idea, so I'm hoping someone can direct me to a solution that enables this type of functionality or make me aware of how it is already enabled but I must use some syntax I'm not currently using.
I found open-project-file and it seems like a nice fit.
Update: I tested it and it works great! You just click on the relative path (whether it is located in code or comment) and by hitting ctrl-shift-o it immediately opens the file in a new tab within the atom editor.
My FTP
Currently looking through my directory of my site build. I'm hoping to edit a LINK , but having trouble finding where the actual pages to edit are.
I can find the link that needs editing (using Chrome/Inspect element) but unable to find the actual document in my FTP. Is there a tab or location that will show me the actual name?
The 'SOURCES' Tab DOES show me file names but that file does not exist in my actual directory.
SOURCES TAB
Chrome/ Inspect Element
Any place I'm not looking?
Thank You!
The easiest way to find any code/link is to download all files in local system and use any IDE to perform "FIND ALL FILES". Following is the way how I tackle this:
Once you installed Notepad++ software, open the Notepad++.
Press Ctrl+F to open the Find and replace tool.
Open Find in files tab. Fill in the Find what: field and select the directory for the search (folder with your site files, template package, theme folder, etc.)
Click on Find all button.
You will see the files and lines with the text you were looking for.
Since one week I'm looking for a solution to add a folder with a specific icon to the favorites sidebar (like Dropbox does it)
Is there any solution to do this with Electron or Objective C?
What I've found so far:
drag & drop it by yourself
fileicon
Programmatically add a folder to "Places" in Finder (don't know if I can extend electron)
Ok I've found this solution:
On macOS you can find this Folder
~/Library/Application Support/com.apple.sharedfilelist/
It contents some *.sfl files. You can edit them with this tool /usr/bin/sfltool. (It's installed on your mac >= 10.11 El Capitan automatically)
Example to add a folder to your favorites:
/usr/bin/sfltool add-item com.apple.LSSharedFileList.FavoriteItems file:///YOURPATH
I can run this command via require('child_process').exec in my electron app and add a folder icon with the fileicon module. (https://www.npmjs.com/package/fileicon)
This is a little bit dirty, but I don't know an other solution.
[UPDATE]: Read first comment
You can edit the sidebar on Mac using the com.apple.sidebarlists.plist preference file. The items will be in the favoriteitems dictionary.
The items you see are all set to being AlwaysVisible. You need to edit that file to add your own file.
I will give some links that might help you.
About the com.apple.sidebarlists.plist file,
http://www.thexlab.com/faqs/finder.html
Finding the com.apple.finder.plist,
https://discussions.apple.com/thread/4122582
Another post,
https://apple.stackexchange.com/questions/139305/how-can-i-add-new-folders-to-the-favorites-in-the-finder-sidebar
I have some jquery code that toggles an active vs. inactive image for a button when a user clicks it. It works fine when I just run everything from windows statically with relative paths.
However, once I migrated it to my django dev box clicking the button will fail to load the desired image if I set a relative path to it through jquery. All other static images are serving fine through css with relative paths, but if I set the relative path through jquery on document load, for instance, it doesn't work. I've confirmed through inspect element that the paths are the same and jquery is setting them correctly.
After trying various relative paths for 20 minutes, I found out that setting the absolute path of the development server works, i.e. "url('http://127.0.0.1:8000/static/img/img.jpg'). I'd like to get relative paths working as this method has its limitations with flexibility and deployment.
Am I running into a limitation of django static file serving? Did I find a bug? Or is there something I'm missing?
Thanks in advance!
I don't know Django, but one approach when your server-side framework gives you a root path is to export that into JavaScript in the main document:
<script>
templateRootPath = {{% static "path to your template dir" %}}
</script>
and to then use where appropriate:
$('#mybutton').css('background,"url('"+templateRootPath+"/img/img.jpg')");