Now Notepad++ will recognise .tpl files as PHP files. When you open the next one, it will contain syntax highlighting.
$
your content
Notepad++ add to every line - Stack Overflow
A couple of methods.
<YourCodeOnEachLine>.*\n
Notes
\n
if straight from your Linux box, but you might just want to check this as it could be \r\n
<YourCodeOnEachLine>
should be swapped for something on each of the lines you want to delete.?
operator after a quantifier.a[^c]+c
a
, followed by one or more character that isn't c
, followed by c
. This will match abc
and adc
.A collection of hints and tips of this topic.
Notepad++ supports showing newlines as CR/LF/CRLF
but does not support showing newlines as ↵
, however you can simulate it:
- I am using the Fira Code here for this example but this will apply to all fonts where this occurs
- The EOL character is shown when using the DejaVu Mono font.
- The question mark character is shown is when the required glyph does not exist in the current font.
- When copying text, the glyph references are copied not the characters, so if a character does not show correctly in one application this does not mean this will be the same in another.
The issue you're encountering is due to the Fira Code font not supporting the ↵
character (Unicode U+21B5: "DOWNWARDS ARROW WITH CORNER LEFTWARDS").
!=
into a neat symbol), but it has a more limited set of Unicode glyphs compared to DejaVu Mono.↵
, so Notepad++ shows a replacement character (typically a question mark or a box), indicating a missing glyph.↩
, ↓
, or ⏎
), though it’s not the same.You can test if Fira Code supports a character by:
VS Code and Notepad++ handle fonts very differently, particularly when it comes to missing glyphs:
App | Font Used | ↵ Glyph Supported by Font? | Font Fallback? | Result |
---|---|---|---|---|
VS Code | Fira Code | ❌ | ✅ Yes | ✔️ Displays ↵ |
Notepad++ | Fira Code | ❌ | ❌ No | ❌ Question mark |
Window should just enable this by default but it doesn't even in windows 11.
The tutorials in the links below will give you a clearer understanding of how and why to perform this upgrade but this is an overview of the methods I found
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name LongPathsEnabled -Type DWord -Value 1
Computer Configuration > Administrative Templates > System > Filesystem > Enable Win32 long paths
LongPathsEnabled
is enabledSet-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name LongPathsEnabled -Type DWord -Value 1
Computer Configuration > Administrative Templates > System > Filesystem > Enable win32 long paths
LongPathsEnabled
setting on all Windows servers hosting Veeam roles.dddd
So you are installing `Git for Windows` and you are asked how to handle line endings, what option should I pick and why? I will answer this question here so you know what to choose and why rather than just following a YouTube video than never explains anything except just click next because this is what I use.
The information here applies to handling EOL in Git and probably applies to people whoe's OS is not Windows such as MacOS and Linux.
Where I can change line endings when using Git for Windows and VSCode? (each overrides the last)
Settings precedence - User and workspace settings | Visual Studio Code
- VSCode (User settings) (
%APPDATA%\Code\User\settings.json
)
- Action: Set EOL for new files.
- Scope: All Workspaces.
- Additional:
- Command Palette ( F1 | Ctrl+Shift+P) --> Preferences: Open User Settings --> `Files: Eol`: LF
- Settings --> Text Editor --> Files --> Eol: LF
- Profiles replace the `User settings`, if loaded.
- These settings are only per user which means they are local and are not shared.
- VSCode (Workspace settings) (
.vscode/settings.json
)
- Action: Set EOL for new files.
- Scope: Workspace.
- Additional:
- These settings can be commited to a repo and thus can be shared between colleagues and the wider world.
- VSCode (Multi-Root Workspace / Workspace Folder setting) (
.vscode/.code-workspace
)
- Action: Set EOL for new files.
- Scope: Specified Workspace Folders.
- Additional:
- Settings for a particular folder can be saved in the
.code-workspace
.- These settings can be commited to a repo and thus can be shared.
- VSCode (Multi-Root Workspace) (
[Workspace Folder]/.vscode/settings.json
)
- Action: Set EOL for new files.
- Scope: Workspace Folder
- Additional:
- These settings can be commited to a repo and thus can be shared.
- Git (Repository) (
.editorconfig
)
- Action: Set EOL for new files.
- Scope: Git repository.
- Additional:
- Visual Studio = Full native support, VS will check your code on every code change.
- VSCode = Partial support is added by extensions.
- VSCode (Extensions) - Examples below:
- Auto Convert End Of Line - Visual Studio Marketplace
- Action: Change the EOL for all
text
files, on save- Scope: Workspace
- Prettier - Code formatter - Visual Studio Marketplace
- Action: Change the EOL for all files, as specified (see below) on save
- Scope: Workspace
- Additional:
- You can use VS Code settings to configure prettier. Settings will be read from (listed by priority):
.prettierrc
(Prettier configuration file).editorconfig
- Visual Studio Code Settings (Ignored if any other configuration is present)
- NOTE: If any local configuration file is present (i.e.
.prettierrc
) the VS Code settings will NOT be used.- The VS Code settings are meant to be used as a fallback and are generally intended only for use on non-project files.
- It is recommended that you always include a prettier configuration file in your project specifying all settings for your project.
- If
options.editorconfig
istrue
and an.editorconfig
file is in your project, Prettier will parse it and convert its properties to the corresponding Prettier configuration. This configuration will be overridden by.prettierrc
, etc. Currently, the following EditorConfig properties are supported:
end_of_line
indent_style
indent_size
tab_width
max_line_length
- End of Line - Options · Prettier - Prettier ships with a handful of format options.
- Unlocking Prettier: Mastering End of Line Configuration | runebook.dev
- Inconsistent EOL characters can lead to unnecessary Git conflicts, making it harder to track changes and collaborate effectively.
- Prettier aims to enforce consistent code style across a project or team. This includes standardizing how line endings are represented.
- This article covers
.prettierrc
and.gtiattributes
- ESLint - Linter - Visual Studio Marketplace
Action: Change the EOL for all files, as specified (see below) on save
Scope: Workspace
- EditorConfig for VS Code - Visual Studio Marketplace
- Action: Change the EOL for all files, as specified in
.editorconfig
, on save- Scope: Workspace
- Additional:
- Supported Properties
indent_style
indent_size
tab_width
end_of_line
(on save)insert_final_newline
(on save)trim_trailing_whitespace
(on save)- Git (Repository) (
.gitattributes
)
- Action: Change the EOL for all files
- Scope: Git repository, but only on files as specified in the
.gitattributes
- Additional:
- Applied when files are checked-in (submitted) to this Git repo.
- Git (Global Config / Git for Windows) (
.gitconfig
)
- Action: Change the EOL for all files
- Scope: All local Git repositories.
- Additional:
- Occurs when files are submitted or retrieved from any Git repo.
- Only
core.autocrf=true
performs a conversion on EOLs during on Check-in and Checkout, all other settings are Checkin-in only.
How to enforce LF EOL (Windows --> VSCode --> Git)
Making the following changes to your Editor and Repo will ensure the best outcome
- VSCode (User settings) (
%APPDATA%\Code\User\settings.json
)
- Scope:
- Set EOL LF for new files, for the User.
- Actions:
- Enable
LF
as the defaultEOL
for the current VSCode User
- Command Palette --> Preferences: Open User Settings --> `file end of line` --> `Files: Eol`: \n
- It will indicate LF at the bottom of the dropdown, which is fine as this is is just a note.
- VSCode (Workspace settings) (
.vscode/settings.json
)
- Scope:
- Set EOL LF for new files, for the Workspace.
- Actions:
- Enable
LF
as the defaultEOL
for the VSCode Workspace
.vscode/settings.json
{ "files.eol": "\n" }Command Palette --> Preferences: Open Workspace Settings --> `file end of line` --> `Files: Eol`: \n
- Git (Repository) (
.editorconfig
)
- Scope:
- Set EOL LF for new files, for the Git Repository.
- Some VSCode extensions will use the EOL and apply upon save.
- Actions:
- Enable
.editorconfig
support (Visual Studio does not need this)
- Install EditorConfig for VS Code
- Not required if you use Prettier as this has supports, but you will need to make sure it is configured to respect
.editorconfig
however.prettierrc
settings will always override.editorconfig
values..editorconfig
sets the EOL for new files but these VSCode extensions set the EOL on save.- Create
.editorconfig
# EditorConfig is awesome: https://EditorConfig.org # top-most EditorConfig file root = true # Default Behaviour [*] end_of_line = lf- VScode (Extensions) (
.prettierrc
) (Prettier)
- Scope:
- Can use .editorconfig or it's own settings, Set EOL LF for new files, for the Git Repository.
- Some VSCode extensions will use the EOL and apply upon save.
- Actions:
- Create
.prettierrc
(only needed if using Prettier){ "endOfLine": "lf" }- VScode (Extensions) (
eslint.config.js
) (ESLint)
- SCope
- Can use .editorconfig or it's own settings, Set EOL LF for new files, for the Git Repository.
- Some VSCode extensions will use the EOL and apply upon save.
- Actions:
- Create
eslint.config.js
(only needed if using ESLint)import { defineConfig } from "eslint/config"; export default defineConfig([ // Default Line Ending { files: ['**/*.*'], rules: { 'linebreak-style': ['error', 'unix'], }, }, // Force batch scripts to always use CRLF line endings { files: ['**/*.[bB][aA][tT]', '**/*.[cC][mM][dD]'], rules: { 'linebreak-style': ['error', 'windows'], }, }, // Force bash scripts to always use LF line endings { files: ['**/*.sh'], rules: { 'linebreak-style': ['error', 'unix'], }, }, ]);- Git (Repository) (
.gitattributes
)
- Scope
- Enforce conversion of EOL to LF.
- Actions:
- Create
.gitattributes
(optional)
# Default Line Ending * text=auto eol=lf
- This will change all text file's EOL to LF when checking them into the repository, but not when you check them out in to your working tree (i.e. real files).
- This is a fallback to enforce EOL before committing and should not be needed if everything in your repo is setup correctly.
- Using this setting (* text=auto eol=lf) on it's own can cause corruption in some case, so a more granular .gitattributes configuration should be usedas Git can make mistakes with line endings, e.g. mixed EOL files and those with binary blobs
- Use and this is a base reference and also consult further notes on this page.
* text=auto eol=lf
is the same as* text=auto
- This rule is doing the same for this repository as
core.autocrf=input
would do for the whole local Git instance.
EOL Handling Summary
- General
- DO NOT use
core.autocrlf
to normalise your line endings
- This can lead to file corruption (i.e. embedded binary blobs in a text file)
- You cannot assume everyone has set their Git development environment the same.
- These settings would be global and thus a local repository would not have control and nor could you mandate changes with your editor.
- Use
.gitattributes
and.editorconfig
to configure line normalisation
- These work on a Per-Repository basis.
- This will allow you granular control of EOL.
- Supports files with different EOL.
- Support an individual file with mixed EOL.
- The repository can define the EOL handling rather than individual user environments.
- This is the professional way to setup a repository.
- .git
- Repo (check-in) = Commit = Submitted to Git
- Working Tree (checkout) = The real files on your PC
- .gitconfig
core.autocrlf=true
- Converts text file's EOL to
LF
on check-in to the repo from the working tree.- Converts text file's EOL to
CRLF
on checkout from the repo to the working tree.- Tends to be recommended setting for Windows developers since it guarantees
LF
in the remote copy of your code while allowing you to useCRLF
in your working tree for full compatibility with Windows editors and file formats.- This setting only needs be used in a Window environment
, but can work in other OS.
core.autocrlf=input
- Converts text file's EOL to
LF
on check-in to the repo from the working tree.- Leaves the working tree untouched.
- This would be the same as:
* text=auto eol=lf
and* text=auto
, but applied globally.- .gitattributes
- Controls how EOL are handled when checking-in files to the Git repository.
- Local files (Working Tree) and their EOL are unaltered by these settings.
- Conflicts might occur when checking out files, but these can be resolved locally without poisoning the repo.
* text=auto eol=lf
,* text=auto
andcore.autocrlf=input
all do the same thing exceptcore.autocrlf=input
works at the Git server level and not on a per repository basis.- (untested) This file will override the
core.autocrlf
settings for specified files in this repository if an appropriate rule exists.- Using this file ensures a consistent behavior for all users, regardless of their Git settings and environment.
- .editorconfig
- An open, editor agnostic schema.
- Defines the EOL for all new files.
- Some VSCode extensions use these settings on save, so these settings can work on new and created files.
- VSCode (User Settings)
- Configuring EOL here will only apply to new files.
- You should change the default EOL to LF as a fallback precaution (unless you are working on Windows only environment).
- These settings are only per user which means they are local and are not shared.
- VSCode (Workspace settings)
- Configuring EOL here will only apply to new files.
- You should change the default EOL to LF as a fallback precaution (unless you are working on Windows only environment).
- These settings can be commited to a repo and thus can be shared.
Checkout as-is, commit as-is (Git for Windows) (core.autocrlf = false)
Why should I choose this option, here is a simple Pros vs Cons:
.gitattributes
..editorconfig
will be honoured and kept when the files are submitted to the repository.Checkout Windows-style, commit Unix-style line endings (Git for Windows) (core.autocrlf = true)
Why should I choose this option, here is a simple Pros vs Cons:
So you already have a load of files with CRLF
and now you need them all to be LF
before committing them to Git.
find . -type f -exec dos2unix {} \;
TYPE input_filename | MORE /P > output_filename
sed -i 's/$/\r/' fileLinux.txt find -type f -exec sed -i 's/$/\r/' '{}' \; tr -d '\r' < fileWindows.txt > fileLinux.txt sed -i 's/\r//' fileWindows.txt
## To convert the newline characters from DOS/Windows to Unix/Linux: $ dos2unix <filename> ## To convert the newline characters from Unix/Linux to DOS/Windows: $ unix2dos <filename>
npm i -g eol-converter-cli eolConverter crlf "**/*.{txt,js,java,etc}"
# Set the default behavior, in case people don't have core.autocrlf set. * text=auto # Explicitly declare text files you want to always be normalized and converted # to native line endings on checkout. *.c text *.h text # Declare files that will always have CRLF line endings on checkout. *.sln text eol=crlf # Denote all files that are truly binary and should not be modified. *.png binary *.jpg binary
git config --global core.autocrlf inputThis will fix any
CRLF
to LF
when you commit.git config --global core.autocrlf trueThis will make sure that, when you checkout in windows, all
LF
will be converted to CRLF
..gitattributes
file as we don't want to expect everyone in our team to set their own config. This file should be placed in the repository root and, if it exists, git will respect it.## Specify precise line ending behaviors * text=auto *.sh text eol=lf *.bat text eol=crlf *.txt text eol=lf
.gitattributes
file* -text
in the .gitattributes
and add .editorconfig
that enforces the projects preferred line endings. An added benefit is that you can also specify file encodings in your .editorconfig
file.############################### # Git Line Endings # ############################### # Set default behaviour to automatically normalize line endings. * text=auto # Force batch scripts to always use CRLF line endings so that if a repo is accessed # in Windows via a file share from Linux, the scripts will work. *.{cmd,[cC][mM][dD]} text eol=crlf *.{bat,[bB][aA][tT]} text eol=crlf # Force bash scripts to always use LF line endings so that if a repo is accessed # in Unix via a file share from Windows, the scripts will work. *.sh text eol=lf ############################### # Git Large File System (LFS) # ############################### # Archives *.7z filter=lfs diff=lfs merge=lfs -text *.br filter=lfs diff=lfs merge=lfs -text *.gz filter=lfs diff=lfs merge=lfs -text *.tar filter=lfs diff=lfs merge=lfs -text *.zip filter=lfs diff=lfs merge=lfs -text # Documents *.pdf filter=lfs diff=lfs merge=lfs -text # Images *.gif filter=lfs diff=lfs merge=lfs -text *.ico filter=lfs diff=lfs merge=lfs -text *.jpg filter=lfs diff=lfs merge=lfs -text *.pdf filter=lfs diff=lfs merge=lfs -text *.png filter=lfs diff=lfs merge=lfs -text *.psd filter=lfs diff=lfs merge=lfs -text *.webp filter=lfs diff=lfs merge=lfs -text # Fonts *.woff2 filter=lfs diff=lfs merge=lfs -text # Other *.exe filter=lfs diff=lfs merge=lfs -text
.gitattributes
. git status
tells you that you’ve changed a file, but running git diff
doesn’t show you any changes.core.autocrlf
is enabled, Git will convert CRLF to LF during commit and LF to CRLF during checkout. A file that contains a mixture of LF and CRLF before the commit cannot be recreated by Git. For text files this is the right thing to do: it corrects line endings such that we have only LF line endings in the repository. But for binary files that are accidentally classified as text the conversion can corrupt data.core.safecrlf
is basically just a way to make sure you don’t irreversably perform CRLF conversion on a binary file..gitattributes
file to manage how Git reads line endings in a specific repository. When you commit this file to a repository, it overrides the core.autocrlf
setting for all repository contributors. This ensures consistent behavior for all users, regardless of their Git settings and environment.lf
, crlf
and native
, which uses the platform’s native line ending. The default value is native
.
git config core.eol lf # LF git config core.eol crlf # CRLF git config core.eol native # platform (default)
# Set the default behavior, in case people don't have core.autocrlf set. * text=auto # Explicitly declare text files you want to always be normalized and converted # to native line endings on checkout. *.c text *.h text # Declare files that will always have CRLF line endings on checkout. *.sln text eol=crlf # Denote all files that are truly binary and should not be modified. *.png binary *.jpg binary
core.autocrlf
setting isn’t the ideal approach for configuring line endings in a project..gitattributes
file to your repo so you can enforce line endings consistently in your codebase regardless of what operating systems your developers are using..gitattributes
file is technically all that you need to enforce the line endings in the remote copy of your code. However, as we just saw, you may still see CRLF
line endings on Windows locally because .gitattributes
doesn’t tell Git to change the working copies of your files. Fortunately, we can take things a step further with an .editorconfig
file; this is an editor-agnostic project that aims to create a standardized format for customizing the behavior of any given text editor. Lots of text editors (including VS Code) support and automatically read this file if it’s present.core.autocrlf
is set to false
on a fresh install of Git, meaning Git won’t perform any line ending normalization. Instead, Git will defer to the core.eol
setting to decide what line endings should be used; core.eol
defaults to native
, which means it depends on the OS you’re using. That’s not ideal because it means that CRLF
may make its way into your code base from Windows devs.core.autocrlf=true
converts files to CRLF
on checkout from the repo to the working tree, while core.autocrlf=input
leaves the working tree untouched.core.autocrlf=true
tends to be recommended setting for Windows developers since it guarantees LF
in the remote copy of your code while allowing you to use CRLF
in your working tree for full compatibility with Windows editors and file formats..gitattributes
config normalizes line endings to LF
for all text files checked into your repo while leaving local line endings untouched in the working tree:text=auto
option tells Git to only normalize line endings to LF
for text files while leaving binary files (images, fonts, etc.) untouched. This distinction is important—we don’t want to corrupt binary files by modifying their line endings..gitattributes
file, your changes won’t take effect immediately for files checked into Git prior to the addition of .gitattributes
. To force an update, you can use the following command since Git 2.16:CRLF
) for line endings, operating systems like Linux and Mac use only the line feed (LF
) character..gitattributes
file to normalize your line endings regardless of what operating systems your developers are using..editorconfig
file to ensure that new files are always created with LF
line endings, even on Windows..gitattributes
file is indeed the best practice, but if you are working on a personal repository, it shouldn’t matter. In fact, autocrlf=true
wouldn’t cause any problems even if you were working with other Linux/Mac developers since the remote code would always have LF
line endings anyway. The main reason why autocrlf
is not useful is because you have to keep setting it up every time you get a new Windows machine (since line ending normalization is turned off by default in Git). If you forget to set it up, you’ll re-introduce CRLF
into the remote code. From my article:.editorconfig
is a text file that overrides the settings of the editor of your choice..editorconfig
you are able to override this settings with a simple text file that usually is checked in with your source code and available for all developers who work on those sources..editorconfig
it will use it immediately and it will check your code on every code change.eol
attribute, the Git config, and the platform (see explanation of eol
below)..gitattributes
file is a special file that tells Git how to handle specific files in your repository..gitattributes
in subfolders for rules that only apply there..gitattributes
file. Here's how you can do it:* text=auto eol=lf
*
: Matches all files in the repository.text=auto
: Tells Git to automatically detect text files.eol=lf
: Ensures that line endings are normalized to LF when files are checked out..gitattributes
:
git add --renormalize . git commit -m "Normalize line endings to LF"
to be continued
I am trying to figure out how to add a custom file type to be recognised by Netbeans.
I am editing .tpl files and I would like them to be recognised as PHP/HTML files.
Solution
This option will use default editor colour, so no colouring any more.
If you upgrade your Java SDK, the NetBeans IDE may give you the following error message (Invalid jdkhome specified) at startup:
Cannot find java.exe in specified jdkhome.
Neither C:\Program Files\Java\jdk1.6.0_10\jre\bin\java.exe
nor C:\Program Files\Java\jdk1.6.0_10\bin\java.exe exists.
Do you want to try to use default version?
This can be corrected by manually editing the netbeans.conf
file found under:
%PROGRAMFILES%\NetBeans 6.5\etc
Replace the line netbeans_jdkhome
with the correct path information. Alternatively, you can comment out the line entirely with #
and NetBeans will use your default JDK, through JAVA_HOME
.
In Netbeans using SVN Subversion you get the following error when you try and sync/checkout files.
svn: Repository UUID '1a063a9b-81f0-0310-xxxxx etc' doesn't match expected UUID '7be80a69-xxxxxx etc'
(I've xxxxx'd out some of the UUID numbers in case they were sensitive in nature)
Notes
Solution
This will be a collection of preferred settings for netbeans. This will prevent me hunting to change that one setting for that annoying feature.
Disable mysql auto closing
When you press return/enter to split SQL statements, Netbeans automaticlly closes the statement and then re-opens it. This makes the code evern messier.
options --> editor --> code completion --> PHP language --> disable 'Use String Auto-Concatenation after Typed Break'
These are some examples of searches in netbeans using a Regex pattern
So i want to change some <input> tags.
<input .....> to <input ..... />
The following will search for all <input strings that do not terminate in />
Search String: <input(.*)([^\/])> Replacement String: <input$1$2 />
However this does not take into account of whether there is a space at the end so I need to do another search for:
<input(.*)({space}){2}\/> - needs finishing
Notes
[^\/]
A minor issue is that the built in Netbeans Subversion integration doesn’t work in a 64-bit install. It helpfully provides a link to the Subversion client software at CollaNet, however the most recent version for Windows is v1.5.5 which isn’t a lot of help if you are using Subversion 1.6.x.
Here I will give the basic instructions on how to use GitHub with Netbeans. I can be confusing at the beginning but does get easier.
Keep files in the project folder
This will be a collection of GitHub specific and Git notes
I have put my real quick overview of accounts plans and who should use what here.
- Public repositories
- Host open source projects in public GitHub repositories, accessible via web or command line.
- Public repositories are accessible to anyone at GitHub.com.
- Collaborators and members for public repositories are always unlimited irrespective of your personal plan (e.g. free, Pro) or your organization's plan (e.g. Free, teams, Enterprise)
- Private repositories
- Host code in private GitHub repositories, accessible via appliance, web, and command line.
- Private repositories are only accessible to you and people you share them with.
- Collaborators and members for private repositories:
- On a GitHub personal account (Free, Pro), collaborators and members are unlimited.
- On a GitHub Free Organization, collaborators and members are unlimited.
- Although collaborators and organization members serve different purposes within GitHub, for organizations subscribed to GitHub Team collaborators must occupy a paid seat in order to access private repositories. Organization members always require a paid seat.
- If you decide to upgrade your organization from GitHub Free to GitHub Team, you must add a paid seat for each organization member as well as each collaborator for them to keep access.
- No data will be lost, just access for those who do not have a seat.
- You only need to buy seats for those users that you want to have access to the organizations repositories going forward, not for everybody who has every made a change or contribution to any of the organization's repositories.
- Upgrading your account's plan - GitHub Docs - If you'd like additional users to have access to your GitHub Team organization's private repositories, you can purchase more seats anytime.
- Pricing Plans
- All pricing @ GitHub is done on a per-user basis.
- Personal accounts and organization seats are classed as separate Billing entities.
- If you upgrade your personal account from GitHub Free to the GitHub Pro plan then you can:
- get additional features for your personal Private repositories such as Pages and Wikis
- you will also get more Git features and various Code workflow enhancements for both your Public and Private repositories.
- If you use GitHub Team for your organization you will also get enhancements for your Public and Private repositories as-well as improved organization management better granular user role control.
- User Accounts
- A user account is for one person and some times is referred to as a `Personal Account`.
A person only needs one user account.
You only need one Facebook account right!- This account can be used to host all of a user's project and also be used to login in to organizations.
- There are currently 2 pricing plans for an `personal` account, Free and Pro.
- If you are an individual developers with no commercial angle, then you should just use a personal/single account for all of your repositories.
- If you need more actions, features and that other stuff then you can upgrade your account to Pro.
- I would use my personal account where I need to fork a repo to push some fixes to someone else's code.
- A user can own more than one organization.
- Organizations
- Organizations are shared accounts where businesses and open-source projects can collaborate across many projects at once, with sophisticated security and administrative features.
- GitHub Free allows you to add as many members and collaborators to your organization as you’d like at no charge.
- There are currently 3 pricing plans for an account, Free, Team and Enterprise.
- Having an organization for your company ensures that the assets are not controlled by single member of staff under their personal account.
You should use an organization for your code if:
- If you are a company and you are making software.
- If you are a individual developer or a company that is going to sell software.
- You will need to collaborate with team members or other entities.
- Your software project(s) will be large.
- Features:
- Allow for collaboration between team members and other entities.
- Allows more granular permissions for repositories that belong to the organization.
- An organisation can have public and private members. Public members do not count towards your organizations seats.
- Allow for for organising repositories by groups such as; Company, Code Language, Software Type, etc.....
- You can convert your personal account into an organization (but this is not best practice).
- You can identify an organization easily because thy have a people tab.
- Organizations can have more than one organization owner to avoid lapses in ownership.
- Teams
- The concept of Teams in GitHub allows for greater flexibility for collaboration and integration, as well as separation of repositories and permissions.
- Enterprise accounts
- Are for very large companies, or those teams that need to manage multiple organisations but all under the same company banner.
- Pricing is done per member, each member requires a seat/license, I am assuming there will always be at leats one member.
- Discounts
- Discounted plans for GitHub accounts - GitHub Docs - GitHub provides discounts to students, educators, educational institutions, nonprofits, and libraries.
.com
with .dev
in the URL. For example, this repo https://github.com/github/dev becomes http://github.dev/github/devRepository --> Insights --> Forks
Repository Type = Network (Forks of other forks)
can be quite useful.https://github.com/Open-Shell/Open-Shell-Menu/compare/v4.4.190...v4.4.191
GitHub Free
and GitHub Pro
follow the instructions below:
This section will deal with configuring GitHub for your developing and company needs.
- The hierarchy of GitHub is as follows:
- Enterprise Account --> Organization --> Repository --> Users
Does setting up a SSH key and PAT allow me to use them to recover my account with my email address when locked out of my account???
Read this article, it is very clear and calming.
- How to Recover Your GitHub Account
- Regain access to your GitHub account with a step-by-step guide on using 2FA codes, email verification, and support requests for account recovery.
- Best Practices to Prevent Account Lockout
- Setting Up Multiple 2FA Methods for Backup
- Downloading and Securely Storing Recovery Codes
- Ensuring Access to Verified Devices and Email Addresses
This is covering the use of 2FA on GitHub.
- If you loose your 2FA methods and your Recovery codes then you will be locked out of your account permanently, this is to protect GitHub and users from social engineering.
- You can use any 2FA method you have configured to login which is useful if you loose access to one.
- Make sure you set up as many recovery methods as possible.
- Having multiple 2FA methods reduces the risk of users getting locked out of their accounts
- 2FA does not just mean TOTP, you can also add SMS, Github Mobile.
- SMS is not really secure, but easy to setup and can prevent lockout.
- Download and print out your Recovery codes
- When you change your password your Recovery Codes will be revoked and new ones issued which you should download immediately.
- Download 2FA Recovery codes here:
Profile --> Settings --> Access --> Password and authentication --> Recovery options --> Recovery codes --> View
The search feature on GitHub is very powerful and is underused by a lot of people.
in:title findme
GET /search/issues?q=text+to+search+in:title+repo:some/repo
This free feature allows you to run websites directly from GitHub, even with your own custom domain name. Useful for small developers who are bandwidth constrained.
master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.What are they and how to do you create, edit and share them.
Apps
in the marketplace, how do i use them + put examples here.
Settings --> Code, planning and automation --> Repositories --> Repository default branch: master/main
Once your organizational structure (or not) is configured you then actually need to create your repos. In this section we will deal with how to setup a nice looking repository to ge the best out of it.
joomla joomla-component joomla-extensions app-server app-site
Bad: https://github.com/webmin/authentic-theme/blob/0ca0f9e215fdad49e028158f1f0d5096295a8595/tconfig-lib.pl#L201C1-L204C6
Good: https://github.com/webmin/authentic-theme/blob/0ca0f9e215fdad49e028158f1f0d5096295a8595/tconfig-lib.pl#L201-L204
LF(Unix/Linux)
locallyCRLF(Windows)
to LF(Linux/Unix)
endings before submission and vice-versa upon checkout.^M
represents carriage return (CR
). This diff means something removed a Unicode BOM from the beginning of the line and added a CR
at the end.^M
is in the new-changes side (right/green side), then that means the file's line-endings were changed from LF
to CRLF
, otherwise, file was CRLF
and is now changed to LF
.^
symbol stands for Control, so ^M
means Ctrl+M.^A
is character code 1 (because A
is 65). ^M
is 77 - 64 = 13 (because M
is 77), which corresponds to carriage return in ASCII.^L
represents the form-feed character (FF
is the abbreviation, not hexadecimal), and has ASCII value 12
or 0x0C
.Try
git config core.whitespace cr-at-eol
to hide it from the diffgit config --global core.autocrlf true
CR
would return the carriage to the first position of the line while LF
would feed to the next line.CR+LF
in the file themselves made it possible to send a file directly to the printer, without any kind of printer driver.CR
and LF
when they were first used.This content is not all specific to GitHub but deserves to be separate section.
Things like flags and badges, add the code and tutorials for them here.
<!-- Copy-paste in your Readme.md file --> <a href = "https://github.com/open-reSource/openresource.dev/graphs/contributors"> <img src = "https://contrib.rocks/image?repo=open-reSource/openresource.dev"/> </a> Made with [contributors-img](https://contrib.rocks).
<img>
tag.
.gitignore
file tells Git which files and folders to ignore (not track).I will include how to use Git in VSCode tips and tricks.
## CentOS / Alma / Rocky / RHEL cd /usr/libexec/webmin/virtual-server ## Ubuntu cd /usr/share/webmin/virtual-server ## Common (the actual patch command) curl https://github.com/virtualmin/virtualmin-gpl/commit/7037f778b30eda80bb9a8a3a1bd4065377763b1c.patch | git apply --reject --whitespace=fix curl https://github.com/virtualmin/virtualmin-gpl/commit/85f803eb05e1fe8db0b59bd5a44fec8590034e88.patch | git apply --reject --whitespace=fixThis is from https://github.com/virtualmin/virtualmin-gpl/issues/747
These are just here for reference, you should only use VSCode with the relevant extensions. It should be noted most IDE also have visual GUIs for handling Git.
There are all of these files and folders that everyone seems to use so I am going to try and get a full list.
these are my notes
This is a collection of Windows power commands to help diagnose and change power and sleep settings.
powercfg /a
powercfg /lastwake
powercfg /DEVICEQUERY wake_armed
The solution might be one or a combination of the following solutions, but I have put them in the order I think you should try them in.
NB: The laptops trackpad, nipple/Pointers and keyboard will not wake the system up.
Links
Options
Notes
Below are the actions I did to prevent my system waking up on it sown, but it was being caused for me by the Mouse.
Open-Shell + RetroBar (with Dark themes from Tek Syndicate) + EarTrumpet + Winaero (context menu and Ribbon fixes) + WindHawk (Taskbar tray system icon tweaks - to hode unwanted system icons)
--------------
I finally upgraded to Windows 11 and discovered a lot of functionality had been removed and Microsoft was making restoring it difficult. In Windows 11 24H2 it is even worse.
I will be outlining my solutions I have found on the internet to restore my desktop to how it was. I will be using 3rd party tools as I did on Windows 10. Not all changes might be required or wanted by you so just do the ones you need.
As I find more solutions I will add them here.
This is optional at the minute as I have not test it, however the Quick Launch step would not be needed if this works.
%SystemDrive%\Users\%username%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch
You can employ more than one of the solutions below to get the work enviroment you need.
The Quick Launch folder
This is just for reference.
%SystemDrive%\Users\%username%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch
Methods / Workarounds
%SystemDrive%\Users\%username%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch
%SystemDrive%\Users\%username%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch
%SystemDrive%\Users\%username%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch
Links
Links
$RegistryPath = 'HKCU:\Control Panel\NotifyIconSettings' $Name = 'IsPromoted' $Value = '1' Get-ChildItem -path $RegistryPath -Recurse | ForEach-Object {New-ItemProperty -Path $_.PSPath -Name $Name -Value $Value -PropertyType DWORD -Force }
Links
Links
ep_setup.exe /uninstall
.ep_setup.exe
to ep_uninstall.exe
and execute that.reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoRestartShell /t REG_DWORD /d 0 /f
Always show all icons and notifications on the taskbar
from prior Windows versions, but also allows for individual apps to be toggled if so desired.
Lenovo ThinkPad series laptops are categorised by their target audience and features, with the E series being entry-level, the L series a step up, and the T series the flagship for professionals, while the X and P series focus on portability and high-performance respectively.
Here's a breakdown of the ThinkPad series (some from Google Search AI):
Explained
- Lenovo ThinkPad T15 Gen 2 Laptop I5-1135G7
- T15
- T Series with a 15" screen
- Gen 2/G2
- Generation 2
- G2/G7: If you see these on their own, it probably is the generation, but make sure it is not part of the CPU number
- check with other links just to see if this was one mistake.
- I5-1135G7
- Intel 11th Gen CPU
Docking Stations
When trying to do an edge to edge fullwidth image slider in Divi so you can use it as an Image carousel, you might run across some simple problems and below are some solutions to this issue.
The Fullwidth slider and normal slider module behave in the same way and the following methods will work on both of them.
This styles the slider how I want it, which is quite standard.
This is the simplest method and easy to do. This whole module is designed for this.
/* Disable Title and Content */ selector .et_pb_slide_description .et_pb_slide_title, selector .et_pb_slide_description .et_pb_slide_content { display: none; }
This allows you to use the slider's `Image and Video`in a full width mode using CSS code to do the magic and works for both fullwidth and the normal slider module and is based on Create a Fullwidth Image Slider using the Divi Slider Module | Divi Sensei
/* Convert Slider module into an Image Carousel (Divi Sensei, Cleaned) - Just add .full-image-slider to your slider - Original */ .full-image-slider .et_pb_slide { padding-left: 0 !important; padding-right: 0 !important; } .full-image-slider .et_pb_slide:first-child .et_pb_slide_image img.active { animation: unset !important; } .full-image-slider .et_pb_container { max-width: 100% !important; width: 100% !important; height: auto !important; min-height: 0 !important; } .full-image-slider .et_pb_slide_image img { max-height: none !important; width: 100% !important; } .full-image-slider .et_pb_slide_image { margin: 0 !important; padding: 0 !important; top: 0 !important; position: relative !important; width: 100% !important; display: block !important; -webkit-animation-name: fade !important; -moz-animation-name: fade !important; -ms-animation-name: fade !important; -o-animation-name: fade !important; animation-name: fade !important; } .full-image-slider .et_pb_slider_container_inner { position: relative; } .full-image-slider .et_pb_slide_description { position: absolute !important; top: 0 !important; bottom: 0 !important; left: 0 !important; right: 0 !important; padding: 0 !important; margin: 0 !important; width: auto !important; height: auto !important; } .full-image-slider .et_pb_slide_description .et_pb_button_wrapper, .full-image-slider .et_pb_slide_description .et_pb_button_wrapper a, .full-image-slider .et_pb_slide_description .et_pb_button_wrapper a:hover { width: 100% !important; height: 100% !important; padding: 0 !important; margin: 0 !important; color: rgba(0, 0, 0, 0) !important; border: none !important; background: none !important; } .et_pb_column.et_pb_slider_fullwidth_off.full-image-slider .et_pb_slide_description .et_pb_slide_title, .et_pb_column.et_pb_slider_fullwidth_off.full-image-slider .et_pb_slide_description .et_pb_slide_content, .full-image-slider .et_pb_slide_description .et_pb_slide_title, .full-image-slider .et_pb_slide_description .et_pb_slide_content { display: none; }
full-image-slider
/* Convert Slider module into an Image Carousel (Divi Sensei) - Adapted to use Free-Form CSS */ selector .et_pb_slide { padding-left: 0 !important; padding-right: 0 !important; } selector .et_pb_slide:first-child .et_pb_slide_image img.active { animation: unset !important; } selector .et_pb_container { max-width: 100% !important; width: 100% !important; height: auto !important; min-height: 0 !important; } selector .et_pb_slide_image img { max-height: none !important; width: 100% !important; } selector .et_pb_slide_image { margin: 0 !important; padding: 0 !important; top: 0 !important; position: relative !important; width: 100% !important; display: block !important; -webkit-animation-name: fade !important; -moz-animation-name: fade !important; -ms-animation-name: fade !important; -o-animation-name: fade !important; animation-name: fade !important; } selector .et_pb_slider_container_inner { position: relative; } selector .et_pb_slide_description { position: absolute !important; top: 0 !important; bottom: 0 !important; left: 0 !important; right: 0 !important; padding: 0 !important; margin: 0 !important; width: auto !important; height: auto !important; } selector .et_pb_slide_description .et_pb_button_wrapper, selector .et_pb_slide_description .et_pb_button_wrapper a, selector .et_pb_slide_description .et_pb_button_wrapper a:hover { width: 100% !important; height: 100% !important; padding: 0 !important; margin: 0 !important; color: rgba(0, 0, 0, 0) !important; border: none !important; background: none !important; } selector .et_pb_slide_description .et_pb_slide_title, selector .et_pb_slide_description .et_pb_slide_content { display: none; }
.et_pb_slide_description, .et_pb_slider_fullwidth_off .et_pb_slide_description { padding: 16% 8%; width: auto; margin: auto; }
.et_pb_fullwidth_slider_0_tb_header { margin-top: 471px !important; }
Constant Image Size
It is best to use images of the same dimensions when making a slider but if you cannot for some reason then use the following code to make images with different sizes all display with a constant dimensions:
Advanced --> Free-Form CSS --> CSS
/* set the height of the slide image*/ selector .et_pb_slide_image img { width: auto; height: 600px; object-fit: cover; }
Custom Gallery Arrows
/* Custom Gallery Arrows */ .et-pb-arrow-prev::before { content: "4"; background-color: #24bca4; border: 1px solid #fff; border-radius: 50%; color: #fff; } .et-pb-arrow-next::before { content: "5"; background-color: #24bca4; border: 1px solid #fff; border-radius: 50%; color: #fff; }