Skip to content

Instantly share code, notes, and snippets.

@diego3g
diego3g / settings.json
Last active April 30, 2024 12:58
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {

Is there an ultimate Makefile?: Part 2 - Libraries

Welcome to the second part of our Makefile series, where we migrate your build system to a more modular structure by including your very own libraries. In the previous article, we covered the fundamentals of creating a powerful Makefile, including directory structure, variable definition, target dependencies, and more. Now, we'll dive deeper into the realm of user-defined libraries, allowing you to unlock the full potential of your Makefile automation. By leveraging static libraries, you can enhance the modularity and reusability of your code, making it easier to manage dependencies and accelerate your development workflow. In this article, we'll walk you through the process of creating and utilizing user-defined static libraries within your Makefile, providing you with the tools to supercharge your C++ projects.

Who is this article for?

  • If you have a GNU Linux development environm
@lohhans
lohhans / README-PTBR.md
Last active April 30, 2024 12:57 — forked from PurpleBooth/README-Template.md
Um modelo para fazer um bom README.md

Título do projeto

Um parágrafo da descrição do projeto vai aqui

🚀 Começando

Essas instruções permitirão que você obtenha uma cópia do projeto em operação na sua máquina local para fins de desenvolvimento e teste.

Consulte Implantação para saber como implantar o projeto.

@SmartFinn
SmartFinn / dhcp-leases-to-dns.rsc
Last active April 30, 2024 12:57
MikroTik (RouterOS) script for automatically setting DNS records for clients when they obtain a DHCP lease
# MikroTik (RouterOS) script for automatically setting DNS records
# for clients when they obtain a DHCP lease.
#
# author SmartFinn <https://gist.github.com/SmartFinn>
:local dnsTTL "00:15:00";
:local token "$leaseServerName-$leaseActMAC";
# Normalize hostname (e.g. "-= My Phone =-" -> "My-Phone")
# - truncate length to 63 chars
@lezhkin11
lezhkin11 / wpf_combobox_selection_box_item_template.xaml
Last active April 30, 2024 12:55
WPF - "Change" SelectionBoxItemTemplate
<ComboBox ItemsSource="{Binding Items}" TextSearch.TextPath="MyProperty" Style="{StaticResource VirtualisedMetroComboBox}">
<ComboBox.Resources>
<DataTemplate x:Key="SelectionBoxTemplate" DataType="classes:ParentClass">
<TextBlock Text="{Binding DisplayString}" />
</DataTemplate>
<!-- Items in pop-up-->
<DataTemplate x:Key="NormalItemTemplate" DataType="classes:ParentClass">
<StackPanel Orientation="Vertical">
@niksumeiko
niksumeiko / git.migrate
Last active April 30, 2024 12:54
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@gismo141
gismo141 / remove_gui_from_debian.sh
Last active April 30, 2024 12:53
Remove all GUI-related Packages from Existing Debian-Installation
apt-get remove -y --purge x11-common
apt-get autoremove -y --purge
apt-get install -y deborphan
deborphan | xargs dpkg -P # do this a bunch of times
@sherjilozair
sherjilozair / main.c
Last active April 30, 2024 12:52
Minimal SDL2 + OpenGL3 example
#include <SDL2/SDL.h>
#ifdef __APPLE__
#include <OpenGL/gl3.h>
#include <OpenGL/gl3ext.h>
#else
#include <GL/gl.h>
#endif
#include <stdbool.h>
#define CODE(...) #__VA_ARGS__
@endolith
endolith / Has weird right-to-left characters.txt
Last active April 30, 2024 12:48
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
command usage
git init Creates an empty Git repository in the specified directory.
git clone <repository name> Clones a repository located at <repository name> onto your local machine.
git add <directory> Stages only the specified changes for the next commit. Replace <directory> with a <file> to change a specific file.
git add . Stages new files and modifications without deletions
git add -A Stages all changes
git add -all Equivalent to git add -A
git add -u Stages modifications and deletions without adding new files
git add --update Equivalent to git add -u
git commit -m ”<message>” Commits the staged snapshot. replace <message> with the commit message.