Skip to content

Instantly share code, notes, and snippets.

View lopugit's full-sized avatar

Nikolaj lopugit

View GitHub Profile
@lopugit
lopugit / ImportError: No module named cryptography.hazmat.bindings.openssl.binding
Created September 6, 2018 13:12
ImportError: No module named cryptography.hazmat.bindings.openssl.binding fix solution aws linux certbot
ln -s /opt/eff.org/certbot/venv/local/lib64/python2.7/dist-packages/cryptography /opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/cryptography
ln -s /opt/eff.org/certbot/venv/local/lib64/python2.7/dist-packages/cffi /opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/cffi
ln -s /opt/eff.org/certbot/venv/local/lib64/python2.7/dist-packages/cffi-1.10.0.dist-info /opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/cffi-1.10.0.dist-info
ln -s /opt/eff.org/certbot/venv/local/lib64/python2.7/dist-packages/_cffi_backend.so /opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/_cffi_backend.so
ln -s /opt/eff.org/certbot/venv/local/lib64/python2.7/dist-packages/.libs_cffi_backend /opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/.libs_cffi_backend
ln -s /opt/eff.org/certbot/venv/local/lib64/python2.7/dist-packages/zope.interface-4.1.3-py2.7-nspkg.pth /opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/zope.interface-4.1.3-py2.7-nspkg.pth
ln -s /opt/eff.org/certbot/ven
@lopugit
lopugit / gist:9691bd72524c5d6fbc97bd32db350069
Created September 22, 2018 07:54
auto connect synergy to any list of ip addresses synergy listening server
#!/bin/bash
# IP address to cycle through (in order of priority)
ip=( "192.168.20.102" "192.168.20.103" )
# Check if synergy is already connected
if pgrep "synergyc"; then
# Synergy already connected
echo "Synergy is already running."
else
@lopugit
lopugit / config.hpp
Created September 22, 2018 20:57
wenode.config
/*
* Copyright (c) 2016 WeYouMe Network., and contributors.
*/
#pragma once
#define BLOCKCHAIN_VERSION ( version(0, 19, 5) )
#define BLOCKCHAIN_HARDFORK_VERSION ( hardfork_version( BLOCKCHAIN_VERSION ) )
#ifndef SHOW_PRIVATE_KEYS
#define SHOW_PRIVATE_KEYS 1
@lopugit
lopugit / twym.accounts.webuilder.json
Last active September 22, 2018 20:57
twym.accounts.webuilder
{
"id": 3,
"name": "webuilder",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [[
"TWYM7GXFkFDNkweQJHhegS1iX5vg1oEouAhZ5EZZR34cYUxQvHFii5",
1
]
@lopugit
lopugit / Isomorphic Fetch post body data empty solution
Last active October 3, 2018 23:07
Isomorphic Fetch post body data empty solution
Client:
fetching with headers:
{ "Content-Type": "application/json" }
Stringifying JSON:
body: JSON.stringify(data)
Server: add:
app.use((req, res, next) => {
res.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
@lopugit
lopugit / drive-format-ubuntu.md
Created January 12, 2019 14:50 — forked from keithmorris/drive-format-ubuntu.md
Partition, format, and mount a drive on Ubuntu
@lopugit
lopugit / eslint bugs
Created February 11, 2019 07:44
eslint bugs
{
"env": {
"es6": true, // Use ES6 recommended
"node": true, // We code in node
"browser": true // We also code for browser
},
//"parser": "babel-eslint",
"extends": "eslint:recommended", // Use the recommended ESlint rules
"parserOptions": {
@lopugit
lopugit / bugs global factory
Created February 20, 2019 12:46
bugs global factory
(function (globalThis, factory) {
if (typeof exports === 'object' && typeof module !== 'undefined')
if (typeof global === 'object')
return factory(global)
else
return factory(exports)
if (typeof define === 'function' && define.amd)
return define(['exports'], factory)
@lopugit
lopugit / 1_primitive_comparison.js
Created May 5, 2019 02:37 — forked from nicbell/1_primitive_comparison.js
JavaScript object deep comparison. Comparing x === y, where x and y are values, return true or false. Comparing x === y, where x and y are objects, returns true if x and y refer to the same object. Otherwise, returns false even if the objects appear identical. Here is a solution to check if two objects are the same.
//Primitive Type Comparison
var a = 1;
var b = 1;
var c = a;
console.log(a == b); //true
console.log(a === b); //true
console.log(a == c); //true
console.log(a === c); //true
@lopugit
lopugit / default.conf
Created June 4, 2019 06:45
NGiNX Configuration for Vue-Router in HTML5 Mode
server {
listen 80 default_server;
listen [::]:80 default_server;
root /your/root/path;
index index.html;
server_name you.server.com;