Skip to content

Instantly share code, notes, and snippets.

@cuibonobo
cuibonobo / centos_python_install.md
Last active April 30, 2024 13:13
Install Python 2.7.15 on CentOS 6

These instructions were mostly taken from here, though I've modified them to install Python 2.7.15 and the latest setuptools package.

# Install dependencies
yum groupinstall -y 'development tools'
yum install -y zlib-devel bzip2-devel openssl-devel xz-libs wget

# Download the Python source and unpack it
wget https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz
tar -xvzf Python-2.7.15.tgz
@StuffAndyMakes
StuffAndyMakes / Charlieplex12LEDs.cc
Last active April 30, 2024 13:10
Arduino sketch code for Charlieplexing 12 LEDs - accompanies project "Charlieplexing LEDs with an AVR ATmega328 (or Arduino)"
#define A 12
#define B 11
#define C 10
#define D 9
#define PIN_CONFIG 0
#define PIN_STATE 1
#define LED_COUNT 12
@edoy-cuizon
edoy-cuizon / Charlieplex12LEDs.cc
Created October 12, 2016 06:27 — forked from StuffAndyMakes/Charlieplex12LEDs.cc
Arduino sketch code for Charlieplexing 12 LEDs - accompanies project "Charlieplexing LEDs with an AVR ATmega328 (or Arduino)"
#define A 12
#define B 11
#define C 10
#define D 9
#define PIN_CONFIG 0
#define PIN_STATE 1
#define LED_COUNT 12
@SMUsamaShah
SMUsamaShah / List of in-browser VMs.md
Last active April 30, 2024 13:08
List of Javascript based virtual machines running in browser
@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.