Skip to content

Instantly share code, notes, and snippets.

@analyticd
analyticd / softhruf-splitography.org
Last active August 29, 2022 12:31
How to change the keymap on the SOFT/HRUF Splitography keyboard

How to change the keymap on the Splitography keyboard

We, follow this guide Getting Started - QMK Firmware carefully. I am on macOS High Sierra, so these notes pertain only to that.

When you get to the part of the above guide where it is time to clone the qmk repo, I do the following:

I don’t want all the history of objects and logs in the repo or its submodules, so I clone shallow both the repo and its submodules:

@FabianoCampos
FabianoCampos / EntityFramework.cs
Created September 21, 2018 16:05
Row_number over (Partition by yyy) em Entity Framework
_contexto.Tramitacao
.Where(x => entrada.Contains(x.IdDocumento))
.GroupBy(x => new { x.IdDocumento })
.Select(g => g.OrderBy(e=> e.IdDocumento).ThenByDescending(e => e.Data).Take(1))
.SelectMany(e => e.Select(x => new TramitacaoDocumentoModel
{
IdDocumento = x.IdDocumento,
IdStatus = x.IdStatus,
DataTramitacao = x.Data
}));
@NathanGiesbrecht
NathanGiesbrecht / noip2.service
Last active February 24, 2024 01:32
Systemd Service file for no-ip.com dynamic ip updater
# Simple No-ip.com Dynamic DNS Updater
#
# By Nathan Giesbrecht (http://nathangiesbrecht.com)
#
# 1) Install binary as described in no-ip.com's source file (assuming results in /usr/local/bin)
# 2) Run sudo /usr/local/bin/noip2 -C to generate configuration file
# 3) Copy this file noip2.service to /etc/systemd/system/
# 4) Execute `sudo systemctl daemon-reload`
# 5) Execute `sudo systemctl enable noip2`
# 6) Execute `sudo systemctl start noip2`
@tliron
tliron / rest.py
Last active January 8, 2022 13:34
Simple and functional REST server for Python (2.7) using no dependencies beyond the Python standard library.
#!/usr/bin/env python
'''
Simple and functional REST server for Python (2.7) using no dependencies beyond the Python standard library.
Features:
* Map URI patterns using regular expressions
* Map any/all the HTTP VERBS (GET, PUT, DELETE, POST)
* All responses and payloads are converted to/from JSON for you
@nerdalert
nerdalert / Netfilter-IPTables-Diagrams.md
Last active May 14, 2024 12:21
Linux NetFilter, IP Tables and Conntrack Diagrams

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

@ScottGuymer
ScottGuymer / RunAllTests.proj
Created February 17, 2014 16:24
MsBuild file to run multiple test projects through mstest and put results into a single file
<Project ToolsVersion="4.0" DefaultTarget="RunTests" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<results_file>./TestResults/results.trx</results_file>
</PropertyGroup>
<PropertyGroup>
<MsTestExePath Condition="'$(MsTestExePath)'==''">C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTest.exe</MsTestExePath>
</PropertyGroup>
@knu
knu / gist:111055
Created May 13, 2009 14:38
How to mass-rename tags and push them with Git
# Rename tags named foo-bar-#.#.# to v#.#.# and push the tag changes
git tag -l | while read t; do n="v${t##*-}"; git tag $n $t; git push --tags ; git tag -d $t; git push origin :refs/tags/$t ; done