developer resources
Codebales holds an ever growing number of solutions to problems that we have experienced in our day to day code writing
Selected filter
104
results
Andrew Fletcher
•
Permission error
Traceback (most recent call last):
File "/var/www/html/open-ai/summarise-ai.py", line 144, in <module>
getfiles()
File "/var/www/html/open-ai/summarise-ai.py", line 26, in getfiles
summarise(filename)
File "/var/www/html/open-ai/summarise-ai.py", line 105, in summarise
savedata(filename, refine_outputs['output_text'])
File "/var/www/html/open-ai/summarise-ai.py", line 118, in savedata
with open(file_name, 'w') as json_file:
...
Andrew Fletcher
•
You can move a file from one directory to another in Python using the shutil...
Andrew Fletcher
•
To set an environment variable on Ubuntu, can be achieved via a few options....
Andrew Fletcher
•
Whilst installing Python 3.11.6 and running the command 'sudo make altinstall',...
Andrew Fletcher
•
Visual Studio Code (VS Code) allows you to manage extensions using the VS Code...
Andrew Fletcher
•
A summary of Node package commands
Short cut commands
npm install <package>
npm i <package>npm install --save <package>
npm i -S <package>npm install --save-dev <package>
npm i -D <package>npm install --global <package>
npm i -G <package>npm test
npm t
Update and outdated
Use outdated to discover dependencies that are out of date
npm outdatedUse update to perform safe dependency upgrades
npm updateUse install <packagename>@latest to...
Andrew Fletcher
•
Logging into the server, and there are packages to be updated. You know...
Andrew Fletcher
•
git clone git@bitbucket.org:{username}/{repo}.git
And I was unceremoniously...
Andrew Fletcher
•
Something I haven't had to do in a while is to change the name of a Git branch...
Andrew Fletcher
•
Post a NetSkope update, composer would fail when running any command that...
Andrew Fletcher
•
I need to generate a patch and then apply automatically to my Drupal installation.
Current path to the file: web/core/modules/views/src/Plugin/views/argument/
Orignal filename: ArgumentPluginBase.php
Adjusted filename: ArgumentPluginBase-adjusted.php
Create a Patch
A patch is used to create or override changes in another file. The command to create a patch is:
diff -u {original filename} {changed filename} > {patchfile}.patchdiff -u...
Andrew Fletcher
•
In the terminal type, the following command:
sudo apt updateAfter typing the...
Andrew Fletcher
•
Attempting to run a composer update command, you know the one used...
Andrew Fletcher
•
Post creating a new branch in the repo, next step was to run the checkout...
Andrew Fletcher
•
Working in an AWS ec2 environment, my goal is to access the server via...