Skip to content

Instantly share code, notes, and snippets.

@rsms
rsms / macos-distribution.md
Last active May 14, 2024 01:16
macOS distribution — code signing, notarization, quarantine, distribution vehicles
@jacopo-j
jacopo-j / frida-spoof.js
Last active May 14, 2024 01:16
Frida script to spoof and hide several Android identifiers
/* Utilities */
var RANDOM = function() {};
function _randomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function _randomHex(len) {
var hex = '0123456789abcdef';
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 14, 2024 01:12
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@yorickvP
yorickvP / wl-clipboard.el
Created March 14, 2019 11:02
teach emacs to use wl-copy
(setq wl-copy-process nil)
(defun wl-copy (text)
(setq wl-copy-process (make-process :name "wl-copy"
:buffer nil
:command '("wl-copy" "-f" "-n")
:connection-type 'pipe))
(process-send-string wl-copy-process text)
(process-send-eof wl-copy-process))
(defun wl-paste ()
(if (and wl-copy-process (process-live-p wl-copy-process))
@anthonyeden
anthonyeden / simplistic-ffmpeg-streaming.py
Created May 28, 2018 11:46
Sending FFmpeg output to HTTP, via Python's Flash
"""
Streaming FFmpeg to HTTP, via Python's Flask.
This is an incredibly simple example, which will yield issues due to inconsistant input and output rates.
If you're going to use this, VLC works okay as a client.
You really need to move FFmpeg into a separate thread, which should help stream audio more consistantly to the HTTP client.
Example by Anthony Eden (https://mediarealm.com.au)
"""
from flask import Flask
@michelson
michelson / async_method_job.rb
Created April 23, 2024 01:50
Asynchronously Concern
class AsyncMethodJob < ApplicationJob
queue_as :default
def perform(target:, method_name:, args:, queue_name: :default)
self.class.queue_as(queue_name)
# `target` could be either an instance or a class
target = target.constantize if target.is_a?(String) # Convert class name to class object if needed
target.send(method_name, *args)
end
end
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active May 14, 2024 01:06
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@chainzero
chainzero / deploy.yml
Created September 12, 2023 14:20
Stable payment SDL example
---
version: "2.0"
services:
web:
image: ovrclk/e2e-test
expose:
- port: 8080
as: 80
to:
- global: true
@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active May 14, 2024 00:59 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from