Skip to content

Instantly share code, notes, and snippets.

@Sukonnik-Illia
Sukonnik-Illia / my_json_dums.py
Last active August 25, 2023 09:20
Python 3 Json with 2 decimals after comma
# We need to ensure that c encoder will not be launched
@patch('json.encoder.c_make_encoder', None)
def json_dumps_with_two_digit_float(some_object):
# saving original method
of = json.encoder._make_iterencode
def inner(*args, **kwargs):
args = list(args)
# fifth argument is float formater which will we replace
args[4] = lambda o: '{:.2f}'.format(o)
return of(*args, **kwargs)
@0x240x23elu
0x240x23elu / Jira bug-exploit
Last active March 12, 2024 09:45
Jira Bug CVE-2019-8449,CVE-2019-8451,CVE-2019-8451,cve-2018-20824,cve-2020-14179,cve-2020-14181,CVE-2018-5230
cve-2019-8449
The /rest/api/latest/groupuserpicker resource in Jira before version 8.4.0 allows remote attackers to enumerate usernames via an information disclosure vulnerability.
https://jira.atlassian.com/browse/JRASERVER-69796
https://victomhost/rest/api/latest/groupuserpicker?query=1&maxResults=50000&showAvatar=true
=====================================================================================================================================
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 2, 2024 16:19
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@benbenbenbenbenben
benbenbenbenbenben / login.cs
Last active August 6, 2022 20:22
how to login to microsoftonline.com/your.tenancy.xyz using WebRequest
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@mc2pw
mc2pw / setting-up-tails-with-persistence.md
Last active February 26, 2023 23:57
Setting up Tails with Persistence

Tails - The Amnesic Incognito Live System - is a live operating system that "aims at preserving your privacy and anonymity." It is a Linux Debian distribution configured to follow several security measures including sending all internet traffic through the Tor network.

These are the steps I followed for setting up Tails. Tails provides a utility for setting up persistence, this utility only works when running a Tails installation created from within Tails using the Tails Installer. After consistently getting an "Operation System Not Found" message on my computer when trying to run the Tails installed by the Tails Installer, some research lead me to find out it was possible to set up persistence manually. This turned out to provide greater flexibility, as now I am able to keep my persistent partition on a USB drive and my Tails installation on a disk.

@exic
exic / player-control
Created December 2, 2014 12:16
Control a player implementing MPRIS D-Bus Specification v2.2
#!/bin/sh
name="$1"
shift
PATHS="org.mpris.MediaPlayer2.$name /org/mpris/MediaPlayer2"
DBUS_SEND="dbus-send --type=method_call --dest=$PATHS"
RC="$DBUS_SEND org.mpris.MediaPlayer2.Player"
if [ "$@" = "prev" ]; then
$RC.Previous
elif [ "$@" = "stop" ]; then
$RC.Pause
@exic
exic / mediaplayer2-listening
Created December 2, 2014 12:11
Get status from player implementing MPRIS D-Bus Specification v2.2
#!/usr/bin/env python
import sys
from os import environ
if 'DISPLAY' not in environ:
exit(0)
name = "rhythmbox"
if len(sys.argv) > 1: