Skip to content

Instantly share code, notes, and snippets.

Avatar

Osoian Marcel OsoianMarcel

View GitHub Profile
View docker-compose.yml
version: '2'
services:
minio:
image: minio/minio
container_name: miniobkp
ports:
- 9000:9000
env_file:
- ./minio.env
@markerikson
markerikson / ReactControlledInputWithState.jsx
Created Aug 2, 2017
React controlled input with internal state example
View ReactControlledInputWithState.jsx
class ControlledInputWithInternalState extends Component {
constructor(props) {
super(props);
this.state = {
isValid : true,
value : props.value
};
}
View image-queue.js
'use strict';
// Dependencies
// we can remove a dependency by using the vision
// package directly
const vision = require('@google-cloud/vision')({
projectId: 'sara-bigquery',
keyfileName: 'keyfile.json'
});
const fs = require('fs');
@tomconte
tomconte / compile-deploy-sign.js
Created Jan 3, 2017
Shows how to compile and deploy a Smart Contract using client-side transaction signature, i.e. does not require the account to be unlocked in the Ethereum node.
View compile-deploy-sign.js
const fs = require('fs');
const solc = require('solc');
const Web3 = require('web3');
const Tx = require('ethereumjs-tx')
// Private key to use to sign the transactions
// To decrypt your private key, use e.g. https://www.myetherwallet.com/#view-wallet-info
// You will find your private key file in e.g. .ethereum/keystore or .parity/keys
// In this example the key should correspond to the web3.eth.coinbase address
var privateKey = new Buffer('088c110b6861b6c6c57461370d661301b29a7570d59cb83c6b4f19ec4b47f642', 'hex')
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active Aug 7, 2020
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)
View letsencrypt_2020.md

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@tracker1
tracker1 / 01-directory-structure.md
Last active Aug 7, 2020
Anatomy of a JavaScript/Node project.
View 01-directory-structure.md

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used
You can’t perform that action at this time.