Skip to content

Instantly share code, notes, and snippets.

View tegila's full-sized avatar

Edson Tégila tegila

View GitHub Profile
[global]
fsid =
cluster = ceph
public network = 10.8.0.0/16
# Enable cephx authentication (which uses shared keys for almost everything)
auth cluster required = none
auth service required = none
auth client required = none
# Replication
osd pool default size = 2
container_name=remapped
lxc init ubuntu-daily:z $container_name
lxc config set $container_name raw.idmap "both $UID 1000"
lxc config device add $container_name homedir disk source=$HOME path=/home/ubuntu
lxc start $container_name
@tegila
tegila / synapse.md
Last active April 7, 2022 22:43
matrix synapse install
emerge -av dev-vcs/git vim tmux
[neko]
location = /var/db/repos/neko
sync-type = git
sync-uri = https://gitlab.com/deepbluev7/neko.git
@tegila
tegila / LXD.md
Last active March 25, 2022 20:25
ssh x1

lxc profile device remove default root
lxc profile device remove default eth0
lxc storage delete local
lxc config unset core.https_address
This file has been truncated, but you can view the full file.
/ticker/fbinance/BTCUSDT 39600.00 -0.05
/ticker/fbinance/BTCUSDT 39600.10 0.1
/ticker/binance/SOLUSDT 81.13000000 5.78
/ticker/binance/SOLUSDT 81.13000000 3.53
/ticker/binance/SOLUSDT 81.13000000 15.34
/ticker/huobi/maticusdt 1.373029 80
/ticker/huobi/maticusdt 1.37304 80
/ticker/fbinance/BTCBUSD 39611.0 -0.001
/ticker/fbinance/BTCBUSD 39611.0 -0.01
/ticker/fbinance/BTCBUSD 39610.9 -0.028
@tegila
tegila / wireguard.sh
Created March 8, 2022 23:13
wireguard bootstrap
#!/bin/bash
systemctl disable wg-quick@wg0
systemctl stop wg-quick@wg0
PRIVATEKEY=$(wg genkey)
CONFIGFILE="/etc/wireguard/wg0.conf"
echo "[Interface]" > $CONFIGFILE
echo "PrivateKey = ${PRIVATEKEY}" >> $CONFIGFILE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <json-c/json.h>
#include <wsclient/wsclient.h>
int onclose(wsclient *c) {
fprintf(stderr, "onclose called: %d\n", c->sockfd);
@tegila
tegila / pyfetch.binance.futures.py
Last active January 9, 2022 01:14
Python fetch orderbook script for binance futures
import requests
import json
# SDK: https://binance-docs.github.io/apidocs/futures/en/#sdk-and-code-demonstration
# The base endpoint is: https://fapi.binance.com
res = requests.get('https://fapi.binance.com/fapi/v1/exchangeInfo')
print(res)
response = json.loads(res.text)
print(response)
// contracts/Valoriza.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/AccessControl.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeMath.sol";
contract Valoriza is ERC20, AccessControl {
using SafeMath for uint256;
@tegila
tegila / ea6900.md
Last active September 11, 2021 23:25
ea6900

Downgrade your router if > 1.1.43.182871 back to 1.1.42.161129

  1. Setup local network:

ifconfig eth0 192.168.1.2 netmask 255.255.255.0

  1. Ping your router forever

ping 192.168.1.1

Start ping your router and observe when the TTL change from 100 to 64.