Skip to content

Instantly share code, notes, and snippets.

@silviopaganini
silviopaganini / install.md
Last active December 4, 2018 16:26
Darknet YOLO Installation on Ubuntu 16.04

Install OpenCV 3.4.0 with CUDA 9.0

https://chuangtc.com/ParallelComputing/OpenCV_Nvidia_CUDA_Setup.php

{
"abi": [{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [{
"name": "",
"type": "string"
}],
"payable": false,

Keybase proof

I hereby claim:

  • I am silviopaganini on github.
  • I am silviopaganini (https://keybase.io/silviopaganini) on keybase.
  • I have a public key ASBn_tm1z7SkwaMuodxxkQAWhovadb66N80yUug7m1-t8go

To claim this, I am signing this object:

Verifying my Blockstack ID is secured with the address 1ACaJd6zjTsdMzHuPsm4aYG4R2pk9uTuWQ https://explorer.blockstack.org/address/1ACaJd6zjTsdMzHuPsm4aYG4R2pk9uTuWQ
@silviopaganini
silviopaganini / Voting.sol
Created November 10, 2017 21:41
Full stack Hello World - Contract updated to use require instead of throw
// Full Tutorial here https://medium.com/@mvmurthy/full-stack-hello-world-voting-ethereum-dapp-tutorial-part-1-40d2d0d807c2
pragma solidity ^0.4.11;
// We have to specify what version of compiler this code will compile with
contract Voting {
/* mapping field below is equivalent to an associative array or hash.
The key of the mapping is candidate name stored as type bytes32 and value is
an unsigned integer to store the vote count
export default function windowPopup(width, height, url, title, win) {
if (typeof width !== 'number' || typeof height !== 'number') {
throw new TypeError('Width and height must be numbers');
}
if (typeof url !== 'string') {
throw new TypeError('Url must be string');
}
if ((typeof title !== 'string') && (typeof title !== 'undefined')) {
import { Component } from 'react';
import PropTypes from 'prop-types';
export default class ScrollToTop extends Component {
static propTypes = {
children: PropTypes.element,
}
static defaultProps = {
children: null,
@silviopaganini
silviopaganini / vhosts.conf
Created August 15, 2015 17:09
Vhost wild card
UseCanonicalName Off
LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
CustomLog logs/access_log vcommon
VirtualDocumentRoot /var/www/html/%0
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1$1 [R=301,L]
<Directory /var/www/html/%0>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
@silviopaganini
silviopaganini / default
Created July 30, 2015 13:01
nginx config
server {
access_log "/var/log/nginx/server.${domain}.access.log";
error_log "/var/log/nginx/server.dev.error.log";
charset utf-8;
listen 80;
index index.html index.htm index.php;
set $basepath "/var/www/domains/projects";
@silviopaganini
silviopaganini / implementation
Last active August 29, 2015 14:24
Letter for Joe
var Letter, PreloaderView,
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
Letter = require('./Letter');
PreloaderView = (function() {
PreloaderView.prototype.el = null;
PreloaderView.prototype.refLetters = null;