Skip to content

Instantly share code, notes, and snippets.

@felipou
felipou / decrypt_dbeaver.py
Last active November 7, 2024 19:20
DBeaver password decryption script - for newer versions of DBeaver
# 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
@jgaskins
jgaskins / server.cr
Last active December 4, 2019 05:30
Serve a sample JSON payload in Crystal
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
@noelbundick
noelbundick / LICENSE
Last active November 6, 2024 11:46
Exclude WSL installations from Windows Defender realtime protection
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:
@leonklingele
leonklingele / 0001-apple-keychain-integration-other-changes.patch
Last active May 15, 2022 14:09
openssh-{7.7,7.8,7.9,8.0,8.1,8.2,8.3,8.4,8.5,8.6,8.7,8.8,8.9,9.0}p1 patches for storing SSH passphrases in the OS X keychain. https://github.com/leonklingele/homebrew-dupes
From 056f784b90d67dcd76aa87aa092d1ecd281b1480 Mon Sep 17 00:00:00 2001
From: Leon Klingele <[email protected]>
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 ++
@greymd
greymd / Main.java
Created February 10, 2017 05:14
Prime numbers with Java8 Stream API
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);
});
@crisward
crisward / mess.cr
Last active October 21, 2016 13:54
kemal mysql
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
@maxinspace
maxinspace / readme.txt
Created October 20, 2015 11:03
Google Authenticator from Terminal
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.

How do I do this thing?

I'm not aware of how to use Google, how do I do this basic thing in Language X?

tagged coding, question

edited by Grammar Nazi (2.5M), asked by 1337z0r (2)

Answer 1 (12)

@dannyid
dannyid / seek.js
Last active March 6, 2021 22:47
Netflix Seek
// The player
var player = netflix.cadmium.objects.videoPlayer();
// Metadata about current episode -- ID and url to get frame at a specific time
var episodeId = netflix.cadmium.metadata.getActiveVideo().episodeId;
var imgRoot = netflix.cadmium.metadata.getActiveVideo().progressImageRoot;
// Generates URL of preview image for given timestamp
function getFrame(timestamp) {
var t = Math.floor(timestamp/10000).toString(10);
@therealmarv
therealmarv / checkopenssl.md
Last active May 31, 2024 23:28
Check OpenSSL version from Python

Open python

python

and type

>>> import ssl
>>> ssl.OPENSSL_VERSION
'OpenSSL 1.0.1g 7 Apr 2014'