<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[wimantis blog]]></title><description><![CDATA[Coding, linux, cryptos, woodworking, electronics.]]></description><link>https://wimantis.ninja/</link><image><url>https://wimantis.ninja/favicon.png</url><title>wimantis blog</title><link>https://wimantis.ninja/</link></image><generator>Ghost 1.25</generator><lastBuildDate>Tue, 18 Apr 2023 13:38:54 GMT</lastBuildDate><atom:link href="https://wimantis.ninja/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[5 best JavaScript front-end frameworks]]></title><description><![CDATA[<div class="kg-card-markdown"><p>JavaScript is a popular programming language used for creating dynamic, interactive web applications. Front-end web development involves building the user interface of a web application, and JavaScript frameworks can make this process more efficient and effective. In this article, we will explore the five best JavaScript front-end frameworks and why</p></div>]]></description><link>https://wimantis.ninja/5-best-javascript-front-end-frameworks/</link><guid isPermaLink="false">643e8d6e9c8efc61e9bc7e3d</guid><category><![CDATA[Web development]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[William Mcmurray]]></dc:creator><pubDate>Tue, 18 Apr 2023 12:36:43 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1632882765546-1ee75f53becb?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDl8fGphdmFzY3JpcHR8ZW58MHx8fHwxNjgxODIxMzM3&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://images.unsplash.com/photo-1632882765546-1ee75f53becb?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDl8fGphdmFzY3JpcHR8ZW58MHx8fHwxNjgxODIxMzM3&ixlib=rb-4.0.3&q=80&w=1080" alt="5 best JavaScript front-end frameworks"><p>JavaScript is a popular programming language used for creating dynamic, interactive web applications. Front-end web development involves building the user interface of a web application, and JavaScript frameworks can make this process more efficient and effective. In this article, we will explore the five best JavaScript front-end frameworks and why you should consider using them.</p>
<h2 id="svelte">Svelte</h2>
<p>Svelte is a relatively new front-end framework that has gained popularity in recent years. It is known for its performance and efficiency, and it offers a unique approach to building user interfaces.</p>
<p>Rather than using a virtual DOM like React or Vue.js, Svelte compiles components into highly optimized JavaScript code at build time. This can result in faster and more efficient code, especially for larger applications.</p>
<p>Svelte is well-suited for building small to medium-sized applications, and it offers a number of features and tools for building efficient and effective user interfaces. However, it may not be the best choice for larger or more complex applications.</p>
<h2 id="vuejs">Vue.js</h2>
<p>Vue.js is a popular front-end framework that is known for its simplicity and ease of use. It is often compared to React in terms of its component-based architecture, but it offers a simpler and more intuitive API.</p>
<p>Vue.js is well-suited for building small to medium-sized applications, and it offers a number of features and tools for building efficient and effective user interfaces. One of the key advantages of Vue.js is its reactivity system, which allows changes to the UI to be automatically reflected in the underlying data.</p>
<p>Vue.js also offers excellent documentation and a vibrant community, making it easy to get started with and learn.</p>
<h2 id="react">React</h2>
<p>React is a popular JavaScript front-end framework developed by Facebook. It is widely used for building user interfaces and offers a number of benefits, including its flexibility, reusability, and performance.</p>
<p>One of the key advantages of React is its component-based architecture, which allows developers to create reusable UI components that can be used across multiple pages or applications. This can save time and improve the overall consistency of a web application.</p>
<p>React also offers excellent performance, thanks to its virtual DOM implementation. This allows updates to be made to the UI without requiring a full page refresh, resulting in a faster and more responsive user experience.</p>
<h2 id="angular">Angular</h2>
<p>Angular is another popular front-end framework, developed by Google. It is a comprehensive framework that offers a wide range of features and tools for building complex web applications.</p>
<p>One of the key advantages of Angular is its dependency injection system, which makes it easy to manage dependencies and reduce code complexity. Angular also offers a powerful templating system that allows developers to create dynamic, data-driven user interfaces.</p>
<p>Angular is well-suited for building large, complex applications, and it offers a number of tools and features for managing state, routing, and data binding. However, it can also be more complex to learn and use than some other frameworks.</p>
<h2 id="emberjs">Ember.js</h2>
<p>Ember.js is a comprehensive front-end framework that is well-suited for building large, complex applications. It offers a number of tools and features for managing state, routing, and data binding, and it has a strong focus on convention over configuration.</p>
<p>One of the key advantages of Ember.js is its convention-based approach, which can reduce the amount of boilerplate code required and make it easier to maintain and update an application over time. Ember.js also offers a number of tools for testing and debugging, which can help ensure the quality and reliability of an application.</p>
<p>However, Ember.js can be more complex to learn and use than some other frameworks, and it may be better suited for experienced developers or teams working on large projects.</p>
<h2 id="conclusion">Conclusion</h2>
<p>There are many great JavaScript front-end frameworks to choose from, each with its own strengths and weaknesses. React, Angular, Vue.js, Ember.js, and Svelte are all excellent choices for building modern web applications, and the best choice will depend on the specific needs and requirements of your project. By considering the features, tools, and performance of each framework, you can make an informed decision and build a high-quality, efficient, and effective web application.</p>
</div>]]></content:encoded></item><item><title><![CDATA[Various tips to live an happy and fulfilling life]]></title><description><![CDATA[<div class="kg-card-markdown"><p>Living a happy and fulfilling life is something that many of us strive for, but it can be difficult to know where to start. There are many different factors that contribute to happiness and fulfillment, including relationships, personal growth, health and well-being, and a sense of purpose. In this article,</p></div>]]></description><link>https://wimantis.ninja/various-tips-to-live-an-happy-and-fulfilling-life/</link><guid isPermaLink="false">643e8aa39c8efc61e9bc7e39</guid><category><![CDATA[Self improvement]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[William Mcmurray]]></dc:creator><pubDate>Tue, 18 Apr 2023 12:25:14 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1587532771889-c9f59344b104?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDEyOXx8aGFwcGluZXNzfGVufDB8fHx8MTY4MTgyMDY3NA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://images.unsplash.com/photo-1587532771889-c9f59344b104?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDEyOXx8aGFwcGluZXNzfGVufDB8fHx8MTY4MTgyMDY3NA&ixlib=rb-4.0.3&q=80&w=1080" alt="Various tips to live an happy and fulfilling life"><p>Living a happy and fulfilling life is something that many of us strive for, but it can be difficult to know where to start. There are many different factors that contribute to happiness and fulfillment, including relationships, personal growth, health and well-being, and a sense of purpose. In this article, we will explore some tips and strategies that can help you live a happier and more fulfilling life.</p>
<h2 id="cultivatestrongrelationships">Cultivate Strong Relationships</h2>
<p>One of the most important factors in leading a happy and fulfilling life is cultivating strong relationships with friends, family, and romantic partners. Positive social connections have been linked to better physical and mental health, higher levels of happiness, and a greater sense of purpose in life.</p>
<p>To cultivate strong relationships, it's important to make time for the people in your life and invest in those relationships. This can involve spending quality time together, having honest and open communication, and supporting each other through life's ups and downs.</p>
<h2 id="pursuepersonalgrowth">Pursue Personal Growth</h2>
<p>Another key to living a happy and fulfilling life is pursuing personal growth and development. This can involve setting goals for yourself and working towards them, learning new skills or hobbies, or engaging in activities that challenge you and push you <strong>outside of your comfort zone</strong>.</p>
<p>Personal growth can help you build confidence and self-esteem, and can give you a sense of purpose and direction in life. It can also help you develop a stronger sense of resilience and adaptability, which is important for navigating life's challenges.</p>
<h2 id="practicegratitude">Practice Gratitude</h2>
<p>Gratitude is a powerful tool for cultivating happiness and fulfillment. By focusing on the positive things in your life and expressing gratitude for them, you can shift your mindset towards one of abundance and appreciation.</p>
<p>There are many different ways to practice gratitude, from keeping a gratitude journal to expressing gratitude to others through thank-you notes or verbal affirmations. Whatever method you choose, the key is to make gratitude a regular practice in your life.</p>
<h2 id="prioritizehealthandwellbeing">Prioritize Health and Well-Being</h2>
<p>Taking care of your physical and mental health is crucial for living a happy and fulfilling life. This can involve eating a healthy diet, getting regular exercise, getting enough sleep, and managing stress.</p>
<p>It's also important to prioritize your mental health by seeking help when you need it, whether that's through therapy, support groups, or other resources. By taking care of your physical and mental health, you can build a strong foundation for happiness and fulfillment in all areas of your life.</p>
<h2 id="findasenseofpurpose">Find a Sense of Purpose</h2>
<p>Having a sense of purpose is a key component of happiness and fulfillment. This can involve finding work or activities that align with your values and passions, volunteering for causes you care about, or pursuing hobbies or interests that give you a sense of meaning and fulfillment.</p>
<p>Finding a sense of purpose can take time and experimentation, but the key is to stay open to new experiences and opportunities. By staying curious and engaged in the world around you, you can discover new passions and interests that bring you joy and fulfillment.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Living a happy and fulfilling life involves cultivating strong relationships, pursuing personal growth, practicing gratitude, prioritizing health and well-being, and finding a sense of purpose. By incorporating these tips and strategies into your daily life, you can build the foundation for a happier, more fulfilling future.</p>
</div>]]></content:encoded></item><item><title><![CDATA[Various strategies to make more money]]></title><description><![CDATA[<div class="kg-card-markdown"><p>While getting rich quickly and easily may sound appealing, it's important to note that there is often no substitute for hard work, perseverance, and a bit of luck. However, here are some strategies that could potentially help you generate income more quickly. Keep in mind that these strategies come with</p></div>]]></description><link>https://wimantis.ninja/various-strategies-to-make-more-money/</link><guid isPermaLink="false">643e0b2d9c8efc61e9bc7e33</guid><category><![CDATA[Finance]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[William Mcmurray]]></dc:creator><pubDate>Tue, 18 Apr 2023 03:20:48 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1579621970795-87facc2f976d?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDV8fGZpbmFuY2V8ZW58MHx8fHwxNjgxNzg3ODg4&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://images.unsplash.com/photo-1579621970795-87facc2f976d?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDV8fGZpbmFuY2V8ZW58MHx8fHwxNjgxNzg3ODg4&ixlib=rb-4.0.3&q=80&w=1080" alt="Various strategies to make more money"><p>While getting rich quickly and easily may sound appealing, it's important to note that there is often no substitute for hard work, perseverance, and a bit of luck. However, here are some strategies that could potentially help you generate income more quickly. Keep in mind that these strategies come with varying degrees of risk, and there is no guarantee of success.</p>
<ul>
<li>
<p><strong>Investing in Stocks and Cryptocurrencies:</strong> High-risk investments in stocks and cryptocurrencies can lead to significant returns if you have a good understanding of the market and can spot trends. However, the risk of losing money is also high. Always do thorough research before investing and never invest more than you can afford to lose.</p>
</li>
<li>
<p><strong>Online Business:</strong> Start an e-commerce store or a dropshipping business. You can sell products online through platforms like Shopify or Amazon. This requires minimal upfront investment, but you'll need to invest time in researching products, marketing, and managing customer service.</p>
</li>
<li>
<p><strong>Freelancing:</strong> Offer your skills as a freelancer on platforms like Upwork or Fiverr. Popular services include web development, graphic design, writing, and marketing. Build a solid profile and portfolio to attract clients, and over time, you can charge higher rates for your work.</p>
</li>
<li>
<p><strong>Real Estate:</strong> Investing in real estate can be a lucrative strategy if you have the capital and can identify undervalued properties. You can either buy properties to rent out, or &quot;flip&quot; them by renovating and selling at a higher price. Research the local market and consider partnering with experienced investors or real estate agents.</p>
</li>
<li>
<p><strong>Affiliate Marketing:</strong> Promote products or services on your website or social media channels and earn a commission for every sale made through your unique affiliate link. Choose a niche you're passionate about and build an audience to maximize your earning potential.</p>
</li>
<li>
<p><strong>Create Digital Products:</strong> Write an e-book, create an online course or develop a mobile app. These digital products can generate passive income once they are completed and marketed effectively.</p>
</li>
<li>
<p><strong>Participate in Gig Economy:</strong> Make use of gig economy platforms like Uber, Lyft, or TaskRabbit to offer services like ride-sharing or local services. This can be a quick way to earn extra income, but it may not be sustainable in the long term.</p>
</li>
<li>
<p><strong>Peer-to-Peer Lending:</strong> Become a lender on peer-to-peer lending platforms like LendingClub or Prosper, where you can lend money to individuals or businesses and earn interest on your investment. This strategy involves risk, as borrowers may default on their loans.</p>
</li>
<li>
<p><strong>Participate in Online Surveys and Market Research:</strong> Sign up for websites that pay you for completing surveys or participating in market research. While the income generated from this strategy is typically small, it can be a quick way to earn some extra cash.</p>
</li>
<li>
<p><strong>Gambling and Betting:</strong> While this is not a recommended strategy, some people attempt to make money through gambling or sports betting. Keep in mind that this is a high-risk approach, and the chances of losing money are much higher than earning a profit.</p>
</li>
</ul>
<p>Remember that no matter which strategy you choose, there are no guarantees. It's essential to approach these strategies with realistic expectations and to be prepared for setbacks along the way.</p>
</div>]]></content:encoded></item><item><title><![CDATA[Coding best practices]]></title><description><![CDATA[<div class="kg-card-markdown"><p>Here is some of the most important coding principles you should know as a developer:</p>
<ul>
<li>
<p><strong>DRY (Don't Repeat Yourself)</strong> - Avoid duplication in your code. Use functions and variables to consolidate repetitive logic.</p>
</li>
<li>
<p><strong>KISS (Keep It Simple, Stupid)</strong> - Don't over-engineer simple solutions. Simple code is easier to maintain and</p></li></ul></div>]]></description><link>https://wimantis.ninja/coding-best-practices/</link><guid isPermaLink="false">643cc9c79c8efc61e9bc7e2f</guid><category><![CDATA[Web development]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[William Mcmurray]]></dc:creator><pubDate>Mon, 17 Apr 2023 04:46:59 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1536104968055-4d61aa56f46a?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDE2fHxkZXZlbG9wZXJ8ZW58MHx8fHwxNjgxNzA2NjAx&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://images.unsplash.com/photo-1536104968055-4d61aa56f46a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDE2fHxkZXZlbG9wZXJ8ZW58MHx8fHwxNjgxNzA2NjAx&ixlib=rb-4.0.3&q=80&w=1080" alt="Coding best practices"><p>Here is some of the most important coding principles you should know as a developer:</p>
<ul>
<li>
<p><strong>DRY (Don't Repeat Yourself)</strong> - Avoid duplication in your code. Use functions and variables to consolidate repetitive logic.</p>
</li>
<li>
<p><strong>KISS (Keep It Simple, Stupid)</strong> - Don't over-engineer simple solutions. Simple code is easier to maintain and less bug-prone.</p>
</li>
<li>
<p><strong>Loose Coupling</strong> - Minimize dependencies between code components. Highly coupled code is brittle and difficult to maintain.</p>
</li>
<li>
<p><strong>High Cohesion</strong> - Ensure that each component/function has a clear purpose and focuses on one concern.</p>
</li>
<li>
<p><strong>Single Responsibility Principle</strong> - A function/class should do one thing and do it well. Avoid God objects that do everything.</p>
</li>
<li>
<p><strong>Refactor Mercilessly</strong> - Continually improving the design, structure, and simplicity of your code.</p>
</li>
<li>
<p><strong>Premature Optimization</strong> - Avoid over-optimizing early. Only optimize if you have proven there is an actual need to through metrics and profiling.</p>
</li>
<li>
<p><strong>Separation of Concerns</strong> - Keep business logic separate from UI logic, network/API logic, persistence logic, etc.</p>
</li>
<li>
<p><strong>Error Handling</strong> - Ensure you have robust error handling for any input, network calls, user access, etc. Anticipate edge cases.</p>
</li>
<li>
<p><strong>Naming Conventions</strong> - Adhere to common styles and conventions for consistency and maintenance.</p>
</li>
<li>
<p><strong>Unit Testing</strong> - Make testing a first-class citizen of your development process, or at least use it for mission-critical parts of your application.</p>
</li>
<li>
<p><strong>YAGNI (You Aren't Gonna Need It)</strong> - Avoid writing code and features before they are actually needed and required by your application.</p>
</li>
</ul>
<p>Hopefully this gave you some insight. Most of them can be learned by experience, it helps when you have actually gone the opposite route and suffered from the consequences of that hehe :)</p>
</div>]]></content:encoded></item><item><title><![CDATA[How to delegate successfully]]></title><description><![CDATA[<div class="kg-card-markdown"><p>Here are some tips for successfully delegating as a team lead or as a manager:</p>
<ul>
<li>
<p><strong>Clearly communicate responsibilities.</strong> Ensure everyone understands their specific responsibilities, tasks, deadlines, etc. Provide clear expectations and objectives.</p>
</li>
<li>
<p><strong>Empower your team.</strong> Give them autonomy to work independently and make decisions. This will boost their confidence, motivation,</p></li></ul></div>]]></description><link>https://wimantis.ninja/how-to-delegate-successfully/</link><guid isPermaLink="false">643cc6e79c8efc61e9bc7e2b</guid><category><![CDATA[Self improvement]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[William Mcmurray]]></dc:creator><pubDate>Mon, 17 Apr 2023 04:19:34 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1557804506-669a67965ba0?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDI0fHxtYW5hZ2VyfGVufDB8fHx8MTY4MTcwNTAyOQ&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://images.unsplash.com/photo-1557804506-669a67965ba0?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDI0fHxtYW5hZ2VyfGVufDB8fHx8MTY4MTcwNTAyOQ&ixlib=rb-4.0.3&q=80&w=1080" alt="How to delegate successfully"><p>Here are some tips for successfully delegating as a team lead or as a manager:</p>
<ul>
<li>
<p><strong>Clearly communicate responsibilities.</strong> Ensure everyone understands their specific responsibilities, tasks, deadlines, etc. Provide clear expectations and objectives.</p>
</li>
<li>
<p><strong>Empower your team.</strong> Give them autonomy to work independently and make decisions. This will boost their confidence, motivation, and ownership. But still provide guidance when needed.</p>
</li>
<li>
<p><strong>Match responsibilities to skills.</strong> Delegate responsibilities that match the skills, experience, and comfort levels of your team members. This sets them up for success.</p>
</li>
<li>
<p><strong>Provide the necessary resources and tools.</strong> Make sure your team has everything they need to get their work done efficiently and effectively. Remove any roadblocks or dependencies.</p>
</li>
<li>
<p><strong>Check-in regularly.</strong> Meet with your team regularly to check-progress, address any blockers, provide feedback, and make sure they are on track. Be available for additional check-ins as needed.</p>
</li>
<li>
<p><strong>Coach and mentor.</strong> Use delegated responsibilities as an opportunity to coach your team members through challenges they face. Provide guidance and help them develop new skills.</p>
</li>
<li>
<p><strong>Share accountability.</strong> Make it clear that while delegating ownership, you still hold your team accountable for the outcomes and responsibilities you have given them. Set clear consequences for lack of progress or quality work.</p>
</li>
<li>
<p><strong>Recognize and reward good work.</strong> Provide praise and rewards when your team members exceed expectations. This will motivate them to continue improving their performance and skills.</p>
</li>
<li>
<p><strong>Be flexible.</strong> Sometimes priorities and schedules change. Be willing to adapt responsibilities and timelines as needed. Communicate changes clearly to your whole team.</p>
</li>
<li>
<p><strong>Gradually increase responsibilities over time.</strong> As your team members prove themselves capable and competent, provide them with additional responsibilities. This helps them grow into more senior roles.</p>
</li>
<li>
<p><strong>Trust your team.</strong> Ultimately, you need to trust that your team has the skills and abilities to get work done. While overseeing them, give them space to problem-solve on their own. Earned trust is key.</p>
</li>
</ul>
<p>I hope this gave you some insight on how to delegate properly !</p>
</div>]]></content:encoded></item><item><title><![CDATA[Coding Patterns Every Web Developer Should Know]]></title><description><![CDATA[<div class="kg-card-markdown"><p>As a web developer, mastering the art of writing clean, maintainable, and scalable code is essential for success. One way to achieve this is by adopting best practices and proven design patterns. In this article, we'll explore some of the most valuable coding patterns that every web developer should be</p></div>]]></description><link>https://wimantis.ninja/coding-patterns-every-web-developer-should-know/</link><guid isPermaLink="false">643cbbe29c8efc61e9bc7e26</guid><category><![CDATA[Web development]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[William Mcmurray]]></dc:creator><pubDate>Mon, 17 Apr 2023 04:03:28 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1551434678-e076c223a692?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDE1fHx3ZWIlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjgxNzA0MTcw&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://images.unsplash.com/photo-1551434678-e076c223a692?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDE1fHx3ZWIlMjBkZXZlbG9wZXJ8ZW58MHx8fHwxNjgxNzA0MTcw&ixlib=rb-4.0.3&q=80&w=1080" alt="Coding Patterns Every Web Developer Should Know"><p>As a web developer, mastering the art of writing clean, maintainable, and scalable code is essential for success. One way to achieve this is by adopting best practices and proven design patterns. In this article, we'll explore some of the most valuable coding patterns that every web developer should be familiar with. Let's dive right in!</p>
<h2 id="1singletonpattern">1. Singleton Pattern</h2>
<p>The Singleton pattern ensures that a class has only one instance and provides a global point of access to that instance. This pattern is particularly useful when you need to coordinate actions across a system, such as centralized logging or configuration management.</p>
<pre><code class="language-js">class Singleton {
  static instance;

  constructor() {
    if (Singleton.instance) {
      return Singleton.instance;
    }
    Singleton.instance = this;
  }
}

const instance1 = new Singleton();
const instance2 = new Singleton();

console.log(instance1 === instance2); // true
</code></pre>
<br>
<h2 id="2modulepattern">2. Module Pattern</h2>
<p>The Module pattern is a way to create private and public scope within a single JavaScript file. It helps to encapsulate code and reduce the risk of naming collisions, making it an excellent choice for organizing and structuring large codebases.</p>
<pre><code class="language-js">const myModule = (() =&gt; {
  const privateVar = 'I am private';

  function privateMethod() {
    console.log('Called from a private method');
  }

  return {
    publicVar: 'I am public',
    publicMethod: () =&gt; {
      privateMethod();
      console.log('Called from a public method');
    },
  };
})();

myModule.publicMethod();
// Output: Called from a private method
// Output: Called from a public method
</code></pre>
<br>
<h2 id="3observerpattern">3. Observer Pattern</h2>
<p>The Observer pattern, also known as Publish-Subscribe or Event-Driven Architecture, allows an object (subject) to maintain a list of dependents (observers) and notify them of any changes in state. This pattern promotes a loose coupling between components, making it easier to maintain and extend your code.</p>
<pre><code class="language-js">class Subject {
  constructor() {
    this.observers = [];
  }

  addObserver(observer) {
    this.observers.push(observer);
  }

  removeObserver(observer) {
    this.observers = this.observers.filter((obs) =&gt; obs !== observer);
  }

  notify(data) {
    this.observers.forEach((observer) =&gt; observer.update(data));
  }
}

class Observer {
  update(data) {
    console.log('Observer received data:', data);
  }
}

const subject = new Subject();
const observer1 = new Observer();
const observer2 = new Observer();

subject.addObserver(observer1);
subject.addObserver(observer2);

subject.notify('Hello, observers!');
</code></pre>
<br>
<h2 id="4factorypattern">4. Factory Pattern</h2>
<p>The Factory pattern is a creational design pattern that provides an interface for creating objects in a super class, allowing subclasses to decide which class to instantiate. It promotes code reusability and simplifies object creation.</p>
<pre><code class="language-js">class ShapeFactory {
  static create(type, ...args) {
    switch (type) {
      case 'circle':
        return new Circle(...args);
      case 'rectangle':
        return new Rectangle(...args);
      default:
        throw new Error('Invalid shape type');
    }
  }
}

class Circle {
  constructor(radius) {
    this.radius = radius;
  }
}

class Rectangle {
  constructor(width, height) {
    this.width = width;
    this.height = height;
  }
}

const circle = ShapeFactory.create('circle', 5);
const rectangle = ShapeFactory.create('rectangle', 4, 6);
</code></pre>
<br>
<h2 id="5prototypepattern">5. Prototype Pattern</h2>
<p>The Prototype pattern is a creational design pattern that allows you to create new objects by copying existing ones rather than creating new instances from scratch. This pattern is particularly useful when object creation is expensive or complicated.</p>
<pre><code class="language-js">class Prototype {
  constructor(template) {
    this.template = template;
  }

  clone() {
    return Object.create(this.template);
  }
}

const originalObj = {
  name: 'John',
  age: 30,
};

const prototype = new Prototype(originalObj);
const clonedObj = prototype.clone();

console.log(clonedObj.name); // John
console.log(clonedObj.age);  // 30
console.log(clonedObj === originalObj); // false
</code></pre>
<br>
<h2 id="6decoratorpattern">6. Decorator Pattern</h2>
<p>The Decorator pattern extends or alters thefunctionality of an object without changing its structure. It involves a set of decorator classes that are used to wrap concrete objects, adding or overriding behavior without modifying the original object's code.</p>
<pre><code class="language-js">class Component {
  operation() {
    throw new Error('Method not implemented');
  }
}

class ConcreteComponent extends Component {
  operation() {
    return 'ConcreteComponent';
  }
}

class Decorator extends Component {
  constructor(component) {
    super();
    this.component = component;
  }

  operation() {
    return this.component.operation();
  }
}

class ConcreteDecoratorA extends Decorator {
  operation() {
    return `ConcreteDecoratorA(${super.operation()})`;
  }
}

class ConcreteDecoratorB extends Decorator {
  operation() {
    return `ConcreteDecoratorB(${super.operation()})`;
  }
}

const concreteComponent = new ConcreteComponent();
const decoratedComponentA = new ConcreteDecoratorA(concreteComponent);
const decoratedComponentB = new ConcreteDecoratorB(decoratedComponentA);

console.log(decoratedComponentB.operation());
// Output: ConcreteDecoratorB(ConcreteDecoratorA(ConcreteComponent))
</code></pre>
<br>
<h2 id="conclusion">Conclusion</h2>
<p>In this article, we have explored six essential coding patterns that every web developer should be familiar with. These patterns can help you write clean, maintainable, and scalable code, ensuring long-term success in your web development projects. Remember, it's crucial to choose the right pattern for the right situation and understand how each pattern can benefit your code structure and organization.</p>
<ul>
<li>The Singleton pattern guarantees that a class has only one instance and provides global access to it.</li>
<li>The Module pattern creates private and public scope within a single JavaScript file, improving code organization.</li>
<li>The Observer pattern enables loose coupling between components by allowing objects to notify dependents of state changes.</li>
<li>The Factory pattern simplifies object creation by delegating instantiation to subclasses.</li>
<li>The Prototype pattern creates new objects by copying existing ones, reducing the cost of object creation.</li>
<li>The Decorator pattern extends or alters the functionality of an object without modifying its structure.</li>
</ul>
<p>By mastering these design patterns, you'll be well-equipped to tackle complex web development challenges and create robust, efficient, and maintainable code.</p>
<p>Happy coding!</p>
</div>]]></content:encoded></item><item><title><![CDATA[How to extract smoke/clouds from opaque image in GIMP]]></title><description><![CDATA[<div class="kg-card-markdown"><p>Extracting semi-transparent shapes from an opaque picture and making a transparent PNG from an opaque picture is not easy without the proper technique.</p>
<p>Let me show you a comparison of different approaches (more details below) :</p>
<p><img src="https://wimantis.ninja/content/images/2022/02/transparency-comparison.jpg" alt="transparency-comparison"></p>
<h2 id="fuzzyselect">Fuzzy select</h2>
<p><em>keyboard shortcut: <code>U</code></em></p>
<p>The fuzzy select tool is equivalent to the magic wand</p></div>]]></description><link>https://wimantis.ninja/how-to-extract-smoke-from-opaque-image-in-gimp/</link><guid isPermaLink="false">61fedb009c8efc61e9bc7df4</guid><dc:creator><![CDATA[William Mcmurray]]></dc:creator><pubDate>Sat, 05 Feb 2022 20:54:03 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1505836684283-b127e3a2495e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDI4fHxzbW9rZXxlbnwwfHx8fDE2NDQwOTI0ODM&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://images.unsplash.com/photo-1505836684283-b127e3a2495e?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDI4fHxzbW9rZXxlbnwwfHx8fDE2NDQwOTI0ODM&ixlib=rb-1.2.1&q=80&w=1080" alt="How to extract smoke/clouds from opaque image in GIMP"><p>Extracting semi-transparent shapes from an opaque picture and making a transparent PNG from an opaque picture is not easy without the proper technique.</p>
<p>Let me show you a comparison of different approaches (more details below) :</p>
<p><img src="https://wimantis.ninja/content/images/2022/02/transparency-comparison.jpg" alt="How to extract smoke/clouds from opaque image in GIMP"></p>
<h2 id="fuzzyselect">Fuzzy select</h2>
<p><em>keyboard shortcut: <code>U</code></em></p>
<p>The fuzzy select tool is equivalent to the magic wand tool in Photoshop, unfortunately it is not as good (from what I remember of Photoshop at least). It may do the job for opaque objects, but not for semi-transparent ones.</p>
<h2 id="selectbycolor">Select by color</h2>
<p><em>keyboard shortcut: <code>Shift + O</code></em></p>
<p>Select by color is a bit better, if your semi transparent image has a lot of holes or spots disconnected from each others, it may be fastidious to grab them all with the Fuzzy select tool. Select by color will select them all at once !<br>
...but the result might still not be satisfying enough.</p>
<h2 id="colortoalpha">Color to alpha</h2>
<p><em>located under: <code>Layer &gt; Transparency &gt; Color to Alpha</code></em></p>
<p>Here is the feature that gives the best results ! It takes the color of your choosing and use it's value to determine the value of the alpha channel.</p>
<p>Your layer must have an Alpha channel thought (same for all other techniques), right click on the layer and click <code>Add Alpha Channel</code> (if this option is not clickable, there is already an alpha channel).</p>
<p>It work best also when the blacks (or whites) are very deep, you can play with Levels or contrast to make sure of that.</p>
<p>I hope it helps, and good luck !</p>
</div>]]></content:encoded></item><item><title><![CDATA[Fix low FPS of WebGL in Chrome, Ubuntu]]></title><description><![CDATA[<div class="kg-card-markdown"><p>I've had this problem for a while, Google Chrome seems to lower the FPS of WebGL content / games to 60 FPS on a dual monitor setup, even if my main monitor uses 144Hz !</p>
<p>Well, here is what I think is happening: chrome seems to use the first monitor as a</p></div>]]></description><link>https://wimantis.ninja/fix-chrome-low-fps-of-webgl-on-ubuntu/</link><guid isPermaLink="false">61c48c069c8efc61e9bc7de7</guid><category><![CDATA[Web development]]></category><category><![CDATA[Ubuntu]]></category><category><![CDATA[3D]]></category><category><![CDATA[three.js]]></category><dc:creator><![CDATA[William Mcmurray]]></dc:creator><pubDate>Thu, 23 Dec 2021 15:08:47 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1457305237443-44c3d5a30b89?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDl8fGR1YWwlMjBtb25pdG9yfGVufDB8fHx8MTY0MDI3MTcwNA&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://images.unsplash.com/photo-1457305237443-44c3d5a30b89?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDl8fGR1YWwlMjBtb25pdG9yfGVufDB8fHx8MTY0MDI3MTcwNA&ixlib=rb-1.2.1&q=80&w=1080" alt="Fix low FPS of WebGL in Chrome, Ubuntu"><p>I've had this problem for a while, Google Chrome seems to lower the FPS of WebGL content / games to 60 FPS on a dual monitor setup, even if my main monitor uses 144Hz !</p>
<p>Well, here is what I think is happening: chrome seems to use the first monitor as a reference to determine the desired FPS of WebGL contents. Now, that does not mean the &quot;primary display&quot; setting, I am talking about the actual numbers you can see in <code>Settings &gt; Screen Display</code>, those numbers :</p>
<a href="https://askubuntu.com/questions/1229016/manually-set-display-numbers" target="_blank">
    <img src="https://i.stack.imgur.com/XSKgR.png" alt="Fix low FPS of WebGL in Chrome, Ubuntu">
</a>
<p>They are assigned by the actual firmware, and so far the only way I've found to change them is to swap display cables on the back of my GPU !</p>
<p>So basically, if your dual monitor setup contains a monitor that is 60Hz, make sure it's not the monitor with number <code>1</code> assigned, swap cables until your best monitor is <code>1</code>, then the problem should be fixed !</p>
</div>]]></content:encoded></item><item><title><![CDATA[Find log4j on your Linux system]]></title><description><![CDATA[<div class="kg-card-markdown"><p>Based on <a href="https://nakedsecurity.sophos.com/2021/12/13/log4shell-explained-how-it-works-why-you-need-to-know-and-how-to-fix-it/">this article about Log4Shell</a>, you can search for any occurence of log4j on your linux system with this command:</p>
<pre><code>sudo find / -iname &quot;log4j*.jar&quot;
</code></pre>
<p>The <code>/</code> indicate to search from the root directory<br>
The <code>-iname</code> is to specify the case insensitive search terms</p>
<p>If nothing outputs after</p></div>]]></description><link>https://wimantis.ninja/find-log4j-on-your-linux-system/</link><guid isPermaLink="false">61b8e1c69c8efc61e9bc7de0</guid><category><![CDATA[Ubuntu]]></category><category><![CDATA[hacking]]></category><category><![CDATA[Web development]]></category><dc:creator><![CDATA[William Mcmurray]]></dc:creator><pubDate>Tue, 14 Dec 2021 18:36:49 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1541728472741-03e45a58cf88?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDJ8fGhhY2tpbmd8ZW58MHx8fHwxNjM5NTA2NzIz&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://images.unsplash.com/photo-1541728472741-03e45a58cf88?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDJ8fGhhY2tpbmd8ZW58MHx8fHwxNjM5NTA2NzIz&ixlib=rb-1.2.1&q=80&w=1080" alt="Find log4j on your Linux system"><p>Based on <a href="https://nakedsecurity.sophos.com/2021/12/13/log4shell-explained-how-it-works-why-you-need-to-know-and-how-to-fix-it/">this article about Log4Shell</a>, you can search for any occurence of log4j on your linux system with this command:</p>
<pre><code>sudo find / -iname &quot;log4j*.jar&quot;
</code></pre>
<p>The <code>/</code> indicate to search from the root directory<br>
The <code>-iname</code> is to specify the case insensitive search terms</p>
<p>If nothing outputs after that command finishes, your system should be okay !</p>
<p>If not, please secure your system.</p>
</div>]]></content:encoded></item><item><title><![CDATA[Use Razer mouse or keyboard without Synapse on Linux]]></title><description><![CDATA[<div class="kg-card-markdown"><p>You just got yourself a new Razer device and you realized you can't configure it without the proprietary Synapse software (which is not available on linux), and now you are sad ?</p>
<p>Be sad no more ! The open-source community got your back.</p>
<h2 id="step1drivers">Step 1 : drivers</h2>
<p>What you need to do is</p></div>]]></description><link>https://wimantis.ninja/use-razer-device-without-synapse-on-linux/</link><guid isPermaLink="false">619bc2619c8efc61e9bc7dd8</guid><category><![CDATA[Ubuntu]]></category><category><![CDATA[electronics]]></category><category><![CDATA[Video Games]]></category><dc:creator><![CDATA[William Mcmurray]]></dc:creator><pubDate>Mon, 22 Nov 2021 16:49:33 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1554876194-024e06bbc3cf?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDF8fHJhemVyfGVufDB8fHx8MTYzNzU5OTAzMw&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://images.unsplash.com/photo-1554876194-024e06bbc3cf?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDF8fHJhemVyfGVufDB8fHx8MTYzNzU5OTAzMw&ixlib=rb-1.2.1&q=80&w=1080" alt="Use Razer mouse or keyboard without Synapse on Linux"><p>You just got yourself a new Razer device and you realized you can't configure it without the proprietary Synapse software (which is not available on linux), and now you are sad ?</p>
<p>Be sad no more ! The open-source community got your back.</p>
<h2 id="step1drivers">Step 1 : drivers</h2>
<p>What you need to do is install <a href="https://openrazer.github.io/">OpenRazer</a> (<a href="https://github.com/openrazer/openrazer">github repo</a>) ! OpenRazer is a collection of drivers for many Razer devices, this will allow communication between your computer and your devices.</p>
<p>Just follow their instructions in the <a href="https://openrazer.github.io/#download">download page</a>.</p>
<h2 id="step2gui">Step 2 : GUI</h2>
<p>You will also need an interface to let you change settings of your devices.</p>
<p>I recommend using <a href="https://polychromatic.app/">Polychromatic</a> (<a href="https://github.com/polychromatic/polychromatic">github repo</a>) because it seems to be well adopted and actively maintained. Just follow their instructions in the <a href="https://polychromatic.app/download/">download page</a> again.</p>
<p><em>(there is also a list of other compatible applications at the end of the <a href="https://github.com/openrazer/openrazer#applications">README</a> of OpenRazer if you want)</em></p>
<p><em>PS: You might need to reboot your computer if the application tell you that your device ID is not recognized, even if it is in the list of supported devices, to make sure drivers are properly running.</em></p>
<p>Happy gaming !!<br>
(or happy &quot;whatever&quot; you do with your computer)</p>
</div>]]></content:encoded></item><item><title><![CDATA[Get more followers on Instagram, for free !]]></title><description><![CDATA[<div class="kg-card-markdown"><p><em>(This applies especially if you are trying to build a business, a brand or simply increasing engagement around your page. It could work better also if your page is about a single clear subject.)</em></p>
<p>My tip goes like this:<br>
<strong>Give to others what you want them to give you.</strong></p>
<p><img src="https://wimantis.ninja/content/images/2021/11/instagram-page-boost.jpg" alt="instagram-page-boost"></p>
<p>Which</p></div>]]></description><link>https://wimantis.ninja/how-to-get-more-likes-and-followers-on-instagram-for-free/</link><guid isPermaLink="false">6195b9b99c8efc61e9bc7dd2</guid><category><![CDATA[Self improvement]]></category><dc:creator><![CDATA[William Mcmurray]]></dc:creator><pubDate>Thu, 18 Nov 2021 04:34:00 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1554177255-61502b352de3?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDF8fGluc3RhZ3JhbSUyMGxpa2VzfGVufDB8fHx8MTYzNzIwODkyNg&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://images.unsplash.com/photo-1554177255-61502b352de3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDF8fGluc3RhZ3JhbSUyMGxpa2VzfGVufDB8fHx8MTYzNzIwODkyNg&ixlib=rb-1.2.1&q=80&w=1080" alt="Get more followers on Instagram, for free !"><p><em>(This applies especially if you are trying to build a business, a brand or simply increasing engagement around your page. It could work better also if your page is about a single clear subject.)</em></p>
<p>My tip goes like this:<br>
<strong>Give to others what you want them to give you.</strong></p>
<p><img src="https://wimantis.ninja/content/images/2021/11/instagram-page-boost.jpg" alt="Get more followers on Instagram, for free !"></p>
<p>Which means, if you want likes and subscribers, you gotta give those likes and subscribes to others ! Don't just stand there, waiting for people to finally find your content, go there and put yourself in front of their eyes !</p>
<h2 id="how">How ?</h2>
<p>What I like to do is using the tags exploration system. In my case, <a href="https://www.instagram.com/made_by_wooden/">my Instagram page</a> is about wood objects I create, therefore I'll choose the most generic hashtag representing the main subject of my page: #woodworking, and I'll browse the <a href="https://www.instagram.com/explore/tags/woodworking/">feed for this hashtag</a>.</p>
<p>This feed will show you the latest posts with that hashtag, you gotta browse that feed, click &quot;like&quot; on everything that you appreciate, comment if you have something to say, check the page of the author, subscribe to them, etc ! The more you give to others here, the more likely they are to notice you and take a look at your page in return (out of curiosity or out of gratitude).</p>
<p>You might also get inspired by all the beautiful work others have put in front of you ! Sometimes it's refreshing to inhale the content of others, it gives you energy when it's time for you to exhale yours.</p>
<p>Good luck ! And why not put a link to your Instagram page in the comments below ? :)</p>
<!-- It's also very easy to insert that activity into your schedule, for example: when you are eating, taking a break or when your cat lies down on your keyboard and request immediate petting ! --></div>]]></content:encoded></item><item><title><![CDATA[Beware: your personal files are visible by all users on Ubuntu, by default !!]]></title><description><![CDATA[<div class="kg-card-markdown"><p>I just discovered this after years of using Ubuntu: every user account you have created on your Ubuntu computer (during installation or afterward) have Read and Execute permission to everything in the <code>/home/</code> directory of EVERY users, by DEFAULT !!</p>
<p><em>(just type <code>ll /home/</code> in a terminal and you'll see <code>drwxr-xr-x</code></em></p></div>]]></description><link>https://wimantis.ninja/beware-your-personal-files-are-visible-by-every-other-users-on-ubuntu-by-default/</link><guid isPermaLink="false">618754699c8efc61e9bc7dca</guid><category><![CDATA[Ubuntu]]></category><category><![CDATA[hacking]]></category><dc:creator><![CDATA[William Mcmurray]]></dc:creator><pubDate>Sun, 07 Nov 2021 22:20:32 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1455368109333-ebc686ad6c58?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDR8fHNweXxlbnwwfHx8fDE2MzYzMjMyNDU&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://images.unsplash.com/photo-1455368109333-ebc686ad6c58?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDR8fHNweXxlbnwwfHx8fDE2MzYzMjMyNDU&ixlib=rb-1.2.1&q=80&w=1080" alt="Beware: your personal files are visible by all users on Ubuntu, by default !!"><p>I just discovered this after years of using Ubuntu: every user account you have created on your Ubuntu computer (during installation or afterward) have Read and Execute permission to everything in the <code>/home/</code> directory of EVERY users, by DEFAULT !!</p>
<p><em>(just type <code>ll /home/</code> in a terminal and you'll see <code>drwxr-xr-x</code> !)</em></p>
<p>This is outrageous, it means that any user account could read every documents, every pictures, every-things of any user, even if that user is supposed to be protected by a password !!</p>
<p>This behavior should be <a href="https://ubuntu.com/blog/private-home-directories-for-ubuntu-21-04">fixed since release 21.04</a> but it DOES NOT FIX PREVIOUSLY CREATED USER ACCOUNTS !</p>
<h2 id="howtofix">How to fix</h2>
<p>You can manually remove the read and execute permission for other users with this command :</p>
<pre><code>sudo chmod 750 /home/*
</code></pre>
<p>And to fix the new account creation process, you have to do this too :</p>
<pre><code>sudo sed -i s/DIR_MODE=0755/DIR_MODE=0750/ /etc/adduser.conf
echo &quot;HOME_MODE 0750&quot; | sudo tee -a /etc/login.defs
</code></pre>
<p>After that you should be good to go.</p>
<p>To make sure everything is working, just try to access the home directory of any other user (ex: <code>ll /home/other_user_name_here/Documents/</code>, it should say <code>Permission denied</code>.</p>
<h2 id="moreinfoapersonalnote">More info &amp; a personal note</h2>
<p>The only <a href="https://ubuntu.com/blog/private-home-directories-for-ubuntu-21-04">explanation</a> I could find for this unsafe and unintuitive default was :</p>
<blockquote>
<p>This default was chosen in the early days of Ubuntu, to support use-cases like multiple family members sharing a single PC and wanting to easily share files with one another or within university environments to support easy collaboration.</p>
</blockquote>
<p>But to me that's not a good excuse ! In the past, I might have created a &quot;guest&quot; account (with no password) on a laptop to let other peoples try Ubuntu... or I might have created an other user account on a personal computer to run apps or scripts that I did not trust, thinking it would be unable to access my personal files... WRONG !</p>
</div>]]></content:encoded></item><item><title><![CDATA[Fix inverted natural horizontal scrolling with touchpad - Ubuntu 20.04]]></title><description><![CDATA[<div class="kg-card-markdown"><p><em>If your installation of Ubuntu is not fresh (an old version that you updated since then), this solution might be exactly what you need to permanently fix this bug.</em></p>
<p>First, check the list of installed input drivers with this :</p>
<pre><code>apt list -i | grep xorg-input
</code></pre>
<p>If you see <code>xserver-xorg-input-synaptics</code> and <code>xserver-xorg-input-libinput</code></p></div>]]></description><link>https://wimantis.ninja/fix-inverted-natural-horizontal-scroll-on-touchpad-ubuntu-20-04/</link><guid isPermaLink="false">6165e4639c8efc61e9bc7dc3</guid><category><![CDATA[Ubuntu]]></category><dc:creator><![CDATA[William Mcmurray]]></dc:creator><pubDate>Tue, 12 Oct 2021 20:06:41 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1484807352052-23338990c6c6?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDJ8fHRvdWNocGFkfGVufDB8fHx8MTYzNDA2ODYzMw&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://images.unsplash.com/photo-1484807352052-23338990c6c6?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDJ8fHRvdWNocGFkfGVufDB8fHx8MTYzNDA2ODYzMw&ixlib=rb-1.2.1&q=80&w=1080" alt="Fix inverted natural horizontal scrolling with touchpad - Ubuntu 20.04"><p><em>If your installation of Ubuntu is not fresh (an old version that you updated since then), this solution might be exactly what you need to permanently fix this bug.</em></p>
<p>First, check the list of installed input drivers with this :</p>
<pre><code>apt list -i | grep xorg-input
</code></pre>
<p>If you see <code>xserver-xorg-input-synaptics</code> and <code>xserver-xorg-input-libinput</code>, good news ! Just uninstall the synaptics package like this :</p>
<pre><code>sudo apt remove xserver-xorg-input-synaptics
</code></pre>
<p><a href="https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/1808#note_629824">The reason</a> is simple : this package is obsolete.</p>
<p>Now restart the xorg server (logging out and then back in will do) and the problem should be fixed ! If it is not, try toggling the &quot;Natural Scrolling&quot; setting in the &quot;Mouse &amp; Touchpad&quot; page of Gnome Settings.</p>
</div>]]></content:encoded></item><item><title><![CDATA[Bash script to create daily, monthly and yearly MySQL database backups]]></title><description><![CDATA[Here is my simple bash script that creates a fresh MySQL database backup every day for the last 30 days, and a monthly backup for the last 12 months, and a yearly backup for the last 10 years !]]></description><link>https://wimantis.ninja/bash-script-to-create-daily-monthly-and-yearly-mysql-database-backups/</link><guid isPermaLink="false">6161b28b9c8efc61e9bc7dbc</guid><category><![CDATA[Web development]]></category><category><![CDATA[Ubuntu]]></category><dc:creator><![CDATA[William Mcmurray]]></dc:creator><pubDate>Sat, 09 Oct 2021 15:40:08 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1597852074816-d933c7d2b988?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDR8fGJhY2t1cHxlbnwwfHx8fDE2MzM3OTM1MzE&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://images.unsplash.com/photo-1597852074816-d933c7d2b988?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDR8fGJhY2t1cHxlbnwwfHx8fDE2MzM3OTM1MzE&ixlib=rb-1.2.1&q=80&w=1080" alt="Bash script to create daily, monthly and yearly MySQL database backups"><p>Here is my simple bash script that creates a fresh MySQL database backup every day for the last 30 days, and a monthly backup for the last 12 months, and a yearly backup for the last 10 years !</p>
<p>It saves the backups on the same server (locally) and it does not notify you by email if an error happens, it's up to you to implement those features if you want. (it does keep track of every success/errors in a log file tho).</p>
<p>This script is meant to be executed once every day in a cronjob (but can be executed more than once per day without problems, if desired).</p>
<p>To schedule it's execution, simply call <code>crontab -e</code> in a terminal (while being logged in as the user that will run the script), and add this :</p>
<pre><code>PATH=/usr/bin
30 2 * * * bash /path/to/script/backup-database.bash
</code></pre>
<p>This will run the script once every day at 2:30 AM.</p>
<script src="https://gist.github.com/wmcmurray/cb1ad25f2d281cbe361d6c69f520a3a1.js"></script>
<br>
<p>PS. Before writing this script, I read <a href="https://sqlbak.com/blog/how-to-automate-mysql-database-backups-in-linux">this article</a> (which contains good alternatives btw), but I just didn't want to install and setup postfix on my server so... I wrote this script.</p>
<p>I hope it helps you !</p>
</div>]]></content:encoded></item><item><title><![CDATA[Fix 307 Internal redirect]]></title><description><![CDATA[<div class="kg-card-markdown"><p>If you are trying to test redirections on your web server (Apache, NGINX, etc), but your web browser (chrome, firefox, etc) keeps redirecting to HTTPS no matter what you do... read on !</p>
<p>The reflex you might have had is to clear your browser's redirection cache, but there is one question</p></div>]]></description><link>https://wimantis.ninja/internal-redirect-307-code-forced-https-redirection/</link><guid isPermaLink="false">615235789c8efc61e9bc7db7</guid><category><![CDATA[Web development]]></category><dc:creator><![CDATA[William Mcmurray]]></dc:creator><pubDate>Mon, 27 Sep 2021 22:07:18 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1465447142348-e9952c393450?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDd8fHRyYWZmaWMlMjBzd2l0Y2h8ZW58MHx8fHwxNjMyNzgwMDU2&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=1080" medium="image"/><content:encoded><![CDATA[<div class="kg-card-markdown"><img src="https://images.unsplash.com/photo-1465447142348-e9952c393450?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDd8fHRyYWZmaWMlMjBzd2l0Y2h8ZW58MHx8fHwxNjMyNzgwMDU2&ixlib=rb-1.2.1&q=80&w=1080" alt="Fix 307 Internal redirect"><p>If you are trying to test redirections on your web server (Apache, NGINX, etc), but your web browser (chrome, firefox, etc) keeps redirecting to HTTPS no matter what you do... read on !</p>
<p>The reflex you might have had is to clear your browser's redirection cache, but there is one question you should answer before doing that : is your domain name subject to the <a href="https://https.cio.gov/hsts/">HTTP Strict Transport Security</a> (HSTS) ? This basically affect most of <a href="https://security.googleblog.com/2017/09/broadening-hsts-to-secure-more-of-web.html">google's top level domains</a> (TLDs) like <code>.dev</code>, <code>.app</code>, etc.</p>
<p>If your domain name is subject to HSTS, your web browser will redirect every traffic to HTTPS <strong>BEFORE</strong> initiating any communications with your web server, this means your Apache/NGINX config will <strong>NOT</strong> have any effect in the redirection that will occur.</p>
<p>HSTS is also the reason why a self-signed SSL certificate will not be enough, you wont be able to bypass it by clicking the &quot;proceed anyway&quot; link. You'll need a properly signed certificate from a valid authority (such as <a href="https://letsencrypt.org/">letsencrypt</a>).</p>
<p>I hope it helped !</p>
</div>]]></content:encoded></item></channel></rss>