This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This instruction will allow you to get keys from Google Authenticator via terminal. | |
1) Download oathtool | |
brew install oathtool | |
http://www.nongnu.org/oath-toolkit/oathtool.1.html | |
2) Get your 2-Factor authentication secret key. | |
For example, instead of capturing barcode, ask Google 2-factor auth to enter code manually. | |
And google 2-factor auth will provide you your secret key. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "./mess/*" | |
require "kemal" | |
require "json" | |
require "mysql" | |
require "pool/connection" | |
db = ConnectionPool.new(capacity: 25, timeout: 0.01) do | |
DB.open(ENV["DATABASE_URL"]) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.stream.IntStream; | |
class Main { | |
public static void main(String args[]) { | |
IntStream.rangeClosed(2, 100) | |
.filter(i -> IntStream.rangeClosed(2, (int)Math.sqrt(i)) | |
.allMatch(j -> i%j != 0)) | |
.forEach(n -> { | |
System.out.println(n); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 056f784b90d67dcd76aa87aa092d1ecd281b1480 Mon Sep 17 00:00:00 2001 | |
From: Leon Klingele <git@leonklingele.de> | |
Date: Thu, 24 Feb 2022 21:50:11 +0100 | |
Subject: [PATCH 1/2] apple-keychain-integration-other-changes | |
--- | |
Makefile.in | 16 +- | |
audit-bsm.c | 7 +- | |
auth.c | 2 +- | |
authfd.c | 25 ++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MIT License | |
Copyright (c) 2018 Noel Bundick | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "http" | |
require "uuid" | |
require "uuid/json" | |
class App | |
include HTTP::Handler | |
def call(context) | |
Fiber.yield # Simulate getting data from the DB | |
response_payload.to_json context.response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection | |
# requires pycryptodome lib (pip install pycryptodome) | |
import sys | |
import base64 | |
import os | |
import json | |
from Crypto.Cipher import AES |
OlderNewer