Skip to content

Instantly share code, notes, and snippets.

@james-d-elliott
james-d-elliott / configuration.yml
Last active May 17, 2024 07:41
Authelia Sample Configuration
###############################################################
# Authelia minimal configuration #
###############################################################
port: 9091
logs_level: info
jwt_secret: insecure_secret
authentication_backend:
file:
path: /etc/authelia/users.yml
totp:
from Crypto.Cipher import AES
import json, string, zlib, hashlib
# NOTE: You must set these as global variables ahead of time.
# TODO: Accept as parameters to API, have a stateful class or something
server_secret = ''
client_secret = ''
# Usage notes:
# Initially, communications only have request crypto, and payloads are plaintext gzip
@padeoe
padeoe / README_hfd.md
Last active May 17, 2024 07:38
CLI-Tool for download Huggingface models and datasets with aria2/wget+git

🤗Huggingface Model Downloader

Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, this command-line tool smartly utilizes wget or aria2 for LFS files and git clone for the rest.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
  • 🚀 Multi-threaded Download: Utilize multiple threads to speed up the download process.
  • 🚫 File Exclusion: Use --exclude or --include to skip or specify files, save time for models with duplicate formats (e.g., *.bin or *.safetensors).
  • 🔐 Auth Support: For gated models that require Huggingface login, use --hf_username and --hf_token to authenticate.
  • 🪞 Mirror Site Support: Set up with HF_ENDPOINT environment variable.

MIFARE Classic

Here are the steps to follow in order to read your cards. Your goal is to find as many keys as possible. The keys unlock sections of your card for the Flipper to read them - you must have a card. Once you read enough sections, you can use an emulated or cloned card at the original card reader to unlock it (sometimes even without finding all of the keys!).

Reading the card

Steps:

  1. Dictionary attack: Try to scan your MIFARE Classic card with NFC -> Read. It will try a dictionary attack of default keys to unlock your card, as well as any keys you may have found through other methods. Do not interrupt the dictionary attack, it may take a while! If it finds 32/32 keys (or 80/80) with 16/16 sectors (or 40/40), congratulations and proceed to "Emulation". If not, continue to step 2.
  2. Mfkey32 attack (): If you have only a few keys found or no keys found, you can get mor
@izadgot
izadgot / Android_WebView_inspector.js
Last active May 17, 2024 07:37
sample Frida script for analyse Android WebView
//Moved to https://github.com/Incognito-Lab/Frida-WebView-Inspector
//frida -U "<ProcessName>" -l Android_WebView_inspector.js
let Webview = Java.use("android.webkit.WebView");
// inspect settings of android.webkit.WebView class
Java.choose("android.webkit.WebView", {
// check if there are any running webview instances
onMatch: function(instance) {
// webview must be running on the main thread, so scheduleOnMainThread() will force the function to run on the main thread
Java.scheduleOnMainThread(function(){
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 17, 2024 07:35
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

import React, { useEffect, useRef } from "react";
import {
motion,
useInView,
useMotionValueEvent,
useScroll,
useTransform,
} from "framer-motion";
export const ScrollAnimations = () => {
@Haraguroicha
Haraguroicha / getWiFiInfo.m
Created April 27, 2016 08:58
Get WiFi Info from private api
@import SystemConfiguration;
#import <dlfcn.h>
#import <mach/port.h>
#import <mach/kern_return.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
#include <net/if.h>
#include <net/if_dl.h>
@clairernovotny
clairernovotny / Job.cs
Created September 19, 2015 01:22
Job objects in .NET
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
internal class Job : IDisposable
{
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 17, 2024 07:25
set -e, -u, -o, -x pipefail explanation