Skip to content

Instantly share code, notes, and snippets.

View RichAyotte's full-sized avatar
🌮
tezos tacos

Richard Ayotte RichAyotte

🌮
tezos tacos
View GitHub Profile
@andrebrait
andrebrait / keychron_linux.md
Last active May 27, 2024 01:03
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@hclivess
hclivess / tezos-rolling.md
Last active February 18, 2020 07:05
Tezos Rolling Mode Guide (How To)

Tezos Rolling Mode Guide (How To)

Running Tezos in this mode will only store the blocks after latest snapshot, no longer requiring hundreds of gigabytes of drive storage space.

The software modification is provided by Nomadic Labs, details: https://blog.nomadic-labs.com/introducing-snapshots-and-history-modes-for-the-tezos-node.html

Upgrade only:

rm -rf tezos
wget https://gitlab.com/nomadic-labs/tezos/-/archive/mainnet-snapshots/tezos-mainnet-snapshots.zip
unzip tezos-mainnet-snapshots.zip
@RichAyotte
RichAyotte / update-tezos-systemd.sh
Last active November 26, 2018 13:20
Update Tezos systemd
#!/bin/bash
# @Author: Richard Ayotte
# @Date: 2018-11-26 08:10:54
# @Last Modified by: rich
# @Last Modified time: 2018-11-26 08:11:35
SYSTEMDPATH=/etc/systemd/system
OLDVERSION=002-PsYLVpVv
NEWVERSION=003-PsddFKi3
APPS=("baker" "endorser" "accuser")
@et4te
et4te / install_nix.md
Last active June 23, 2018 17:14
Preparing for betanet launch with Nix and the Ledger Nano S

Preparing for betanet launch with Nix and Ledger Nano S

This guide is for users of the Nix package manager and assumes you have a Ledger Nano S updated with the latest firmware (at this time 1.4.2).

NOTE If you are not on NixOS, skip the sections which have NixOS at the start of the heading.

NixOS Binary Cache Configuration

To hasten the build process (it could take days to build without this), add the following to /etc/nixos/configuration.nix if you are on NixOS.

@dakk
dakk / tezos-baking-howto.md
Last active March 6, 2022 21:22
tezos-baking-howto.md

Tezos baking howto

This howto is valid for Betanet on Ubuntu or Debian

Setup

Prereq

You have to install some dependencies. In debian / ubuntu run:

@DreaMinder
DreaMinder / A Nuxt.js VPS production deployment.md
Last active October 11, 2023 11:33
Deployment manual for a real-world project built with nuxt.js + koa + nginx + pm2

Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin-panel SPA, nuxt.js renderer and JSON API.

This manual is relevant for VPS such as DigitalOcean.com or Vultr.com. It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger than a landing page.

UPD: This manual now compatible with nuxt@2.3. For older versions deployment, see revision history.


Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:

#!/usr/bin/env python
import requests
import json
from forex_python.bitcoin import BtcConverter
def get_price(symbol):
currency = json.loads(requests.get("https://coinmarketcap-nexuist.rhcloud.com/api/" + symbol).text)
return currency['price']['usd']
b = BtcConverter()
@JasonHoffmann
JasonHoffmann / gforms_styles.css
Created September 13, 2016 03:22
gravityforms-bootstrap4
.btn > .caret, .gform_button > .caret,
.dropup > .btn > .caret,
.dropup > .gform_button > .caret {
border-top-color: #000 !important;
}
.gform_fields {
padding-left: 0;
list-style: none;
margin-left: -15px;
@lethee
lethee / env.py
Created March 21, 2016 07:53
Sublime Text 3: Apply NVM environment
# Save this file
# mac - "~/Library/Application Support/Sublime Text 3/Packages/"
# linux - "~/.config/sublime-text-3/Packages/"
# NOTE!
# ~/.nvm/alias/default must contain full version name.
# $ nvm alias default v4.3.5
import os
@Yimiprod
Yimiprod / difference.js
Last active May 10, 2024 16:49
Deep diff between two object, using lodash
/**
* This code is licensed under the terms of the MIT license
*
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {