Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
tmux new-session -d -s logs || true
for name in `docker ps --format json | jq -s 'sort_by(.Names)|.[].Names)'`
do
tmux split-window -h -f
tmux send-keys "docker logs -f -n 20 $name" C-m
tmux select-pane -T $name
done
tmux kill-pane -t 0
@origamiofficial
origamiofficial / Recaptcha Solver (Automatically solves Recaptcha in browser).user.js
Created March 25, 2022 04:42
Recaptcha Solver in Browser | Automatically solves Recaptcha in browser by engageub | Note: This script is solely intended for the use of educational purposes only and not to abuse any website. This script uses audio in order to solve the captcha. Use it wisely and do not abuse any website. Click "Raw" to install it on Tampermonkey
// ==UserScript==
// @name Recaptcha Solver (Automatically solves Recaptcha in browser)
// @namespace Recaptcha Solver
// @version 2.1
// @description Recaptcha Solver in Browser | Automatically solves Recaptcha in browser
// @author engageub
// @match *://*/recaptcha/*
// @connect engageub.pythonanywhere.com
// @connect engageub1.pythonanywhere.com
// @grant GM_xmlhttpRequest
@Synkevych
Synkevych / rails_shortcut.md
Last active November 21, 2023 16:14
Basic commands for working with a Rails project

Rails commands

irb - command to launch ruby interpreter in any directory
rails c - command lets you interact with your Rails application from the command line
reload! - reload rails environment if you had changed model functionality
gem outdated - show all outdated gems on project
gem update [<gem_name>] - update a specific gem
./bin/webpack-dev-server - start webpacker dev server for fast compiling
code $(bundle show gem_name) - shortcut to open a Ruby gem in VS Code

@kinoute
kinoute / .Dockerfile
Last active March 28, 2024 04:44
Example of Ruby on Rails 6 Multi-stage builds with Docker. Development/production environments share the same Dockerfile.
FROM ruby:2.7.1-slim AS base
LABEL maintainer="Yann Defretin <yann@defret.in"
# Common dependencies
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq \
--no-install-recommends \
build-essential=12.6 \
gnupg2=2.2.12-1+deb10u1 \
@olehmell
olehmell / subsocial-pallet.rs
Created February 27, 2020 18:37
Subsocial-pallet in ryst and types.json for registry types on UI
#![cfg_attr(not(feature = "std"), no_std)]
/// For more guidance on FRAME pallets, see the example.
/// https://github.com/paritytech/substrate/blob/master/frame/example/src/lib.rs
pub mod defaults;
pub mod messages;
pub mod functions;
use sp_std::prelude::*;
@jimmychu0807
jimmychu0807 / string-conversion.rs
Created November 21, 2019 10:20
Conversion between String, str, Vec<u8>, Vec<char> in Rust
use std::str;
fn main() {
// -- FROM: vec of chars --
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}'];
// to String
let string1: String = src1.iter().collect::<String>();
// to str
let str1: &str = &src1.iter().collect::<String>();
// to vec of byte
@anonymoussprocket
anonymoussprocket / README.md
Last active March 16, 2021 06:31
Tezos User Workflows with ConseilJS

Purpose

Single script to test common Tezos user workflows. Additionally this sample illustrates the use of ConseilJS for interactions with a Tezos blockchain node.

Environment

This tutorial requires nodejs 12.21+ & npm. It's highly recommended to install those via nvm.

Steps

{
"TransactionInput": {
"parent_output": "Hash",
"signature": "Signature"
},
"TransactionOutput": {
"value": "u128",
"pubkey": "Hash",
"sale": "u32"
},
parity --chain ethereum --ports-shift 0000 --no-warp --node-key supersecret0000
parity --chain classic --ports-shift 0100 --no-warp --node-key supersecret0100
parity --chain ropsten --ports-shift 0200 --no-warp --node-key supersecret0200
parity --chain kovan --ports-shift 0300 --no-warp --node-key supersecret0300
parity --chain ethereum --ports-shift 1000 --light --no-hardcoded-sync --node-key supersecret1000
parity --chain classic --ports-shift 1100 --light --no-hardcoded-sync --node-key supersecret1100
parity --chain ropsten --ports-shift 1200 --light --no-hardcoded-sync --node-key supersecret1200
parity --chain kovan --ports-shift 1300 --light --no-hardcoded-sync --node-key supersecret1300
@brandoncurtis
brandoncurtis / venus.md
Last active January 31, 2018 13:32
Setting up the Venus testnet on Ethermint (a Tendermint EVM chain, part of the Cosmos project)

All of this is prefaced on having Go installed: https://golang.org/doc/install Go is properly installed if echo $GOPATH returns something that makes sense.

Ethermint

First, install Ethermint. Normally I'd do this:

$ go get -u -d github.com/tendermint/ethermint
$ cd $GOPATH/src/github.com/tendermint/ethermint