Skip to content

Instantly share code, notes, and snippets.

@iamnewton
iamnewton / bash-colors.md
Last active April 30, 2024 09:58
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@0xEva
0xEva / IDA Pro lumen.abda.nl public Lumina server.md
Last active April 30, 2024 09:58
Setting up IDA Pro to use lumen.abda.nl public Lumina server

Compiling socat on Cygwin

  1. Get a copy of socat source code here http://www.dest-unreach.org/socat/
  2. Make sure to install gcc-core, libssl-devel, make
  3. In your Cygwin terminal, run ./configure --enable-openssl-base --enable-openssl-method
  4. make optionally make install

Set up IDA Pro to use lumen.abda.nl public Lumina server

  1. Get a copy of lumen.abda.nl's certificate here https://abda.nl/lumen/hexrays.crt
  2. Change PATH_TO_IDA in ida_abda.nl_lumen.bat then run it
  3. Go to Options -> General -> Lumina, set server addr to 127.0.0.1, port 1234, Username guest, Password guest
@jidckii
jidckii / alertmanager.tmpl
Created April 5, 2023 14:08
Alertmanager telegram template
{{ define "__yucca_text_alert_list" }}{{ range . }}
---
🪪 <b>{{ .Labels.alertname }}</b>
{{- if .Annotations.summary }}
📝 {{ .Annotations.summary }}{{ end }}
{{- if .Annotations.description }}
📖 {{ .Annotations.description }}{{ end }}
🏷 Labels:
{{ range .Labels.SortedPairs }} <i>{{ .Name }}</i>: <code>{{ .Value }}</code>
{{ end }}{{ end }}
@bassamsdata
bassamsdata / _Notes.md
Last active April 30, 2024 09:54
MiniFiles Git integration

Below is a code for Minifiles Git integration code snippet.

How to use it

Just insert the code below into this function in your Minifiles config:

config = function()
-- add the git code here
end
@sevaa
sevaa / ToUTF8.sql
Last active April 30, 2024 09:51
Converting an NVARCHAR string to a UTF-8 VARBINARY data block in pure Transact-SQL
create function [dbo].[ToUTF8](@s nvarchar(max))
returns varbinary(max)
as
begin
declare @i int = 1, @n int = datalength(@s)/2, @r varbinary(max) = 0x, @c int, @c2 int, @d varbinary(4)
while @i <= @n
begin
set @c = unicode(substring(@s, @i, 1))
if (@c & 0xFC00) = 0xD800
begin
@sdstrowes
sdstrowes / foo.md
Created September 1, 2017 08:04
Reverse Engineering the Speedtest.net Protocol, Gökberk Yaltıraklı

Source: https://web.archive.org/web/20141216073338/https://gkbrk.com/blog/read?name=reverse_engineering_the_speedtest_net_protocol Author: Gökberk Yaltıraklı

Reverse Engineering the Speedtest.net Protocol

After finishing my command line speed tester written in Rust, I didn't have a proper blog to document this process. A few days ago I wrapped up a simple blogging script in Python so hopefully it works good enough to explain how everything works.

By now I have already figured out the whole protocol for performing a speed test but I will write all the steps that I took so you can learn how to reverse engineer a simple protocol.

The code that I wrote can be found at https://github.com/gkbrk/speedtest-rust.

@zatarra
zatarra / brain.py
Last active April 30, 2024 09:49
Python script to parse data from Mindflex headband and convert it into a powerfull EEG device
#!/usr/bin/python
import serial
import sys
latestByte = ('c')
lastByte = ('c')
inPacket = False
myPacket = []
PLENGTH = 0
@vyv03354
vyv03354 / gist:fa60598c53e98d3e724b15344c0ebe72
Last active April 30, 2024 09:49
(ZF⁻)−3 のモデルについて

『キューネン 数学基礎論講義』の置換公理 のページの内容について質問があります。 「万有集合をもつモデルは基礎の公理 (A2) をみたさない」というのは本当でしょうか?

$A$$0$を除くすべての要素は$0$を要素に持つので、

  • $x=0$の場合:$∃y∈A(y∈_\mathfrak{A}x)$が成り立たないのでよい。
  • $x≠0$の場合:$y$として$0$を取れば$0∈_\mathfrak{A}x∧¬∃z∈A(z∈_\mathfrak{A}x∧z∈_\mathfrak{A}0)$が成り立つのでよい。

となって、A2が$\mathfrak{A}$で成り立っているように見えます。内包公理があると万有集合から自分自身のみを要素に持つ集合が作れてしまうのでだめですが、内包公理がないので問題ないはずです。

@ingridbonnet
ingridbonnet / hello.c
Created April 30, 2024 09:48
mon hello world
int main()
{
printf("Hello world");
return 0
}
From 7341a316c38a61cc745ce04e618916677007883b Mon Sep 17 00:00:00 2001
From: Timothy Brom <thb@timbrom.com>
Date: Wed, 29 Feb 2012 11:29:55 -0500
Subject: [PATCH] Fixed error about strexh and strexb using the same register
---
example/libs_stm/inc/core_support/core_cm3.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/example/libs_stm/inc/core_support/core_cm3.c b/example/libs_stm/inc/core_support/core_cm3.c