Skip to content

Instantly share code, notes, and snippets.

@EugeneTheDev
EugeneTheDev / DotsLoaders.kt
Created March 18, 2021 23:15
Dots loading animations with Jetpack Compose
import androidx.compose.animation.core.*
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@onatcipli
onatcipli / go_router_example.dart
Last active May 21, 2024 08:19
go_router_example.dart
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
main() {
CustomNavigationHelper.instance;
runApp(const App());
}
class App extends StatelessWidget {
const App({Key? key}) : super(key: key);
@davidallenlewis
davidallenlewis / social-link-custom-icons.php
Last active May 21, 2024 08:18
Add custom icons to Social Link Block (Front End)
@davidallenlewis
davidallenlewis / social-link-custom-icons.js
Last active May 21, 2024 08:18
Add custom icons to Social Link Block (Editor)
@shijij
shijij / gist:54c9b21f26c08a15a70c182f03cb15b4
Created November 14, 2017 12:31
Nginx ssl reverse proxy with SNI
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name yourdomain
ssl_certificate /etc/ssl/localcerts/yourdomain.crt;
ssl_certificate_key /etc/ssl/localcerts/yourdomain.key;
ssl_ecdh_curve prime256v1;
ssl_session_cache builtin:1000 shared:SSL:10m;
@simonw
simonw / recover_source_code.md
Last active May 21, 2024 08:14
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@rutcreate
rutcreate / README.md
Last active May 21, 2024 08:13
Install Python 3.10.x on Ubuntu 20.04

Prerequisite

sudo apt update
sudo apt install software-properties-common -y

Add custom APT repository

@hbldh
hbldh / keyconv.py
Last active May 21, 2024 08:12
Convert a ssh-keygen public key to XML format for C# use.
def convert_openssh_key_to_xml(key, verbose=False):
"""Convert Public Key to XML format for C# usage.
See http://stackoverflow.com/a/13104466 for details.
.. code-block: python
>>> public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDz[...]"
>>> xml_public_key = convert_openssh_key_to_xml(public_key, verbose=True)
>>> print(xml_public_key)
@VityaSchel
VityaSchel / README.md
Last active May 21, 2024 08:12
Example of reading another process memory in Go without knowing base address

You can find explanation here: https://stackoverflow.com/questions/71716646/golang-calculate-address-of-another-process-memory-based-on-process-handle-and-o/72674927#72674927 This is actually my answer posted by my friend because SO doesn't allow you to reclaim your own bounty :)

It's not perfect because I don't know Go and you can definetely replace windows.OpenProcess with kernel32.OpenProcess but I'm too tired to experiment. It just works!

Also keep in mind that this code only works if you have running TJoC:R game running, because I was writing it for my trainer . You should change process name and addresses if you know how to do that. Otherwise, feel free to copy any part of code and use it.

@pisarukv
pisarukv / read.go
Last active May 21, 2024 08:08
read.go
package docker
import (
"context"
"io"
"github.com/ory/dockertest"
"github.com/ory/dockertest/docker"
)