Skip to content

Instantly share code, notes, and snippets.

[StructLayout(LayoutKind.Sequential)]
struct MIB_IPNETROW
{
[MarshalAs(UnmanagedType.U4)]
public int dwIndex;
[MarshalAs(UnmanagedType.U4)]
public int dwPhysAddrLen;
[MarshalAs(UnmanagedType.U1)]
public byte mac0;
[MarshalAs(UnmanagedType.U1)]
@ignaciocastro
ignaciocastro / ublock-youtube-annoyances
Created November 13, 2021 23:17
uBlock filters for Youtube search / homepage annoyances
##Add this to uBlock Origin > My filters
#Blocks unrelated results from search
www.youtube.com##ytd-shelf-renderer:has(#title:has-text(/^\s*(People also watched|For you|Previously watched|Latest from)\s*$/))
#Blocks list of recent uploads from a channel from search
www.youtube.com##ytd-shelf-renderer.style-scope:has-text(/Latest from/)
#Blocks Mix results from search
www.youtube.com##ytd-radio-renderer
#Blocks unrelated searches from search
www.youtube.com##ytd-horizontal-card-list-renderer.ytd-item-section-renderer:has-text(People also search for)
@richieforeman
richieforeman / makeauthority.sh
Created July 23, 2012 21:38
Issue Your Own Self-Signed S/MIME Certs with OpenSSL
# Run this once
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@pisculichi
pisculichi / radios_nacionales.txt
Last active May 13, 2024 03:03
URLs de radios nacionales de Argentina, para poder escuchar en la terminal con mplayer o vlc
# alias radio='function __radio(){ r=`grep -v "#" radios_nacionales.txt | grep -m 1 -i $1 | cut -d" " -f1`; cvlc $r 2> /dev/null; }; __radio'
# podria utilizarse mplayer en vez de vlc
AMs Nacionales
http://cdn.instream.audio:9288/stream Radio Madre 530
https://streaming1.hostingmontevideo.com:7019/; Radio Colonia 550
http://server.laradio.online:25224/live.mp3 Radio Argentina 570
http://playerservices.streamtheworld.com/api/livestream-redirect/CONTINENTAL_SC Continental 590
https://streammax.alsolnet.com/radiorivadavia Rivadavia 630
@malle-pietje
malle-pietje / index.html
Last active May 13, 2024 03:02
Redirection to a custom URL from the UniFi controller JSP-based captive portal
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<title><unifi txt="Redirector" /></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="refresh" content="0;url=https://<YOUR CAPTIVE PORTAL URL>/<unifi var="mac" />/<unifi var="ap_mac" />">
</head>
<body>
</body>
</html>
@halloweeks
halloweeks / log.txt
Last active May 13, 2024 03:02
c++ zlib compress decompress string
# compile
g++ zlib.cpp -o zz -lz
# run
root@localhost:~# ./zz
Orignal string size: 43
Original string: halloweeks halloweeks halloweeks halloweeks
--------------------
Compressed string size: 22
@Quorafind
Quorafind / Dynamic Highlight.data.md
Last active May 13, 2024 02:50
Using dynamic highlight to highlight HH:mm/H:mm time format in Obsidian

Import data json below to dynamic highlight config.

{
  "light-time-8-5": {
    "class": "light-time-8-5",
    "color": "#E45858",
    "regex": true,
    "query": "(?<=\\s)(0?8|20):[3-5][0-9](:[0-5][0-9])?(?=(\\s|$))",
    "mark": [
@jl2
jl2 / gpxparse.c
Created May 7, 2010 05:14
Parse GPX file using libxml2
/* gpxparse.c
Copyright (c) 2010, Jeremiah LaRocco jeremiah.larocco@gmail.com
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
@juanfal
juanfal / gist:09d7fb53bd367742127e17284b9c47bf
Created January 10, 2020 09:07
Codon table in Python dict
codontab = {
'TCA': 'S', # Serina
'TCC': 'S', # Serina
'TCG': 'S', # Serina
'TCT': 'S', # Serina
'TTC': 'F', # Fenilalanina
'TTT': 'F', # Fenilalanina
'TTA': 'L', # Leucina
'TTG': 'L', # Leucina
'TAC': 'Y', # Tirosina