Skip to content

Instantly share code, notes, and snippets.

@leonardofed
leonardofed / README.md
Last active July 26, 2025 08:08
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@Arinerron
Arinerron / permissions.txt
Last active June 17, 2025 21:06
A list of all Android permissions...
android.permission.ACCESS_ALL_DOWNLOADS
android.permission.ACCESS_BLUETOOTH_SHARE
android.permission.ACCESS_CACHE_FILESYSTEM
android.permission.ACCESS_CHECKIN_PROPERTIES
android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY
android.permission.ACCESS_DOWNLOAD_MANAGER
android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
android.permission.ACCESS_DRM_CERTIFICATES
android.permission.ACCESS_EPHEMERAL_APPS
android.permission.ACCESS_FM_RADIO
anonymous
anonymous / playground.rs
Created November 13, 2016 06:01
Shared via Rust Playground
// clap::Values is an iterator of &str
fn arg_to_platforms(platforms_option: Option<clap::Values>) -> Result<Vec<PlatformKind>, String> {
if let Some(platform_values) = platforms_option {
let mut platforms: Vec<PlatformKind> = vec![];
for platform in platform_values {
platforms.push(platform.parse::<PlatformKind>()?);
}
platforms.sort();
@leviroth
leviroth / modmail-api.markdown
Last active March 23, 2022 21:18
Tips and tricks for Reddit's "new modmail" API

This document collects various quirks and useful pieces of information that I came across in adding support for the new modmail API to PRAW.

Secret Codes

Certain pieces of data are represented by numerical codes, which had to be deciphered through trial and error. These lists could easily be incomplete.

Mod actions

@Lokathor
Lokathor / async-irc-bot-demo.rs
Last active April 25, 2018 03:23
A demo of an IRC bot that can asynchronously send and receive messages. No need for any fancy external crates or frameworks.
// This demo program is placed into the Public Domain.
use std::net::TcpStream;
use std::io::{Read, Write};
use std::string::String;
use std::thread;
use std::time::Duration;
/// We can expand on this later, but for now we just use an alias.
type IRCMessage = String;
@belst
belst / rocketguide.md
Last active March 29, 2025 20:35
Deploy Rocket in production

Deploy Rocket using Letsencrypt and nginx

Information

This guide uses the domain your-domain.tld and its www. prefixed version. It starts the rocket application on 127.0.0.1:1337 and as the user www-data. The proxy listens on port 80 and 443 though.
If you need other values, update them accordingly in your nginx and systemd configs.

Prerequisites

You need to have nginx, certbot and rust installed.

@NoraCodes
NoraCodes / work_queue.rs
Last active May 5, 2025 11:02
An example of a parallel work scheduling system using only the Rust standard library
// Here is an extremely simple version of work scheduling for multiple
// processors.
//
// The Problem:
// We have a lot of numbers that need to be math'ed. Doing this on one
// CPU core is slow. We have 4 CPU cores. We would thus like to use those
// cores to do math, because it will be a little less slow (ideally
// 4 times faster actually).
//
// The Solution:

Looking into the Future

futures-rs is the library which will hopefully become a shared foundation for everything async in Rust. However it's already become renowned for having a steep learning curve, even for experienced Rustaceans.

I think one of the best ways to get comfortable with using a library is to look at how it works internally: often API design can seem bizarre or impenetrable and it's only when you put yourself in the shoes of the library author that you can really understand why it was designed that way.

In this post I'll try to put down on "paper" my understanding of how futures work and I'll aim to do it in a visual way. I'm going to assume you're already somewhat familiar with Rust and why futures are a useful tool to have at one's disposal.

For most of this post I'll be talking about how things work today (as of September 2017). At the end I'll touch on what's being proposed next and also make a case for some of the changes I'd like to see.

If you're interested in learning more ab

# FF57+, Use Default Dark Theme + Normal Density
:root:-moz-lwtheme-brighttext {
--chrome-background-color: #424242 !important;
--chrome-color: #8f8f8f !important;
--chrome-secondary-background-color: #363636 !important;
--toolbox-border-bottom-color: #2e2e2e !important;
}
[data-identity-color="blue"] {
--identity-tab-color: #7193F7 !important;