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
@bnoordhuis
bnoordhuis / http-and-https-proxy.js
Created February 8, 2013 16:31
A node.js proxy that accepts HTTP and HTTPS traffic on the same port.
var fs = require('fs');
var net = require('net');
var http = require('http');
var https = require('https');
var httpAddress = '/path/to/http.sock';
var httpsAddress = '/path/to/https.sock';
fs.unlinkSync(httpAddress);
fs.unlinkSync(httpsAddress);
@staltz
staltz / introrx.md
Last active July 4, 2024 10:11
The introduction to Reactive Programming you've been missing
@RichAyotte
RichAyotte / demo.html
Last active January 10, 2019 22:52
Performance Comparison for React, Angular and Knockout
<!DOCTYPE html>
<html ng-app="test">
<head>
<title>Performance Comparison for Knockout, Angular and React</title>
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.css" rel="stylesheet" />
<style type="text/css">
* { box-sizing:border-box; }
body { padding:30px 0; }
h2 { margin:0; margin-bottom:25px; }
h3 { margin:0; padding:0; margin-bottom:12px; }
@Yimiprod
Yimiprod / difference.js
Last active July 4, 2024 13:14
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) {
@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
@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;
#!/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()
@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:

@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:

@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.