Skip to content

Instantly share code, notes, and snippets.

View roberto-butti's full-sized avatar
🚀

Roberto Butti roberto-butti

🚀
View GitHub Profile
@roberto-butti
roberto-butti / Roberto_s_Workout.zwo
Created March 29, 2018 19:37
Roberto's Workout
<workout_file>
<author>Roberto</author>
<name>Roberto&apos;s Workout</name>
<description>Pump up the Volume</description>
<sportType>bike</sportType>
<tags>
</tags>
<workout>
<SteadyState Duration="300" Power="0.5"/>
<SteadyState Duration="180" Power="0.65"/>
@roberto-butti
roberto-butti / prova.solidity
Last active May 28, 2018 13:32
Sample Solidity file
pragma solidity ^0.4.19;
// 1. Import here
import "./ownable.sol";
// 2. Inherit here:
contract ZombieFactory is Ownable {
event NewZombie(uint zombieId, string name, uint dna);
uint dnaDigits = 16;
@roberto-butti
roberto-butti / gist:852735dc8a42f11b15b9e21935adc7d4
Created February 17, 2018 20:08
Prompt for ZShell (with hostname, username, path and git info)
PROMPT='%{$fg_bold[green]%}%n @ %{$fg_bold[white]%}%M %{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
@roberto-butti
roberto-butti / lara_top.php
Created February 11, 2018 17:12
Laravel will be over the top!!!
<?php
$opts = [
'http' => [
'method' => 'GET',
'header' => [
'User-Agent: PHP Laravel will be over the TOP'
]
]
];
$context = stream_context_create($opts);
{
"years": [2006],
"0": [{
"year": "2006",
"name": "FRANCESCO",
"count": "10004",
"gender": "m",
"percent": "3.5204526899581"
}, {
"year": "2006",
@roberto-butti
roberto-butti / index.vue
Created August 21, 2017 21:05
Home page, index.vue
<template>
<section class="container">
<div>
<logo/>
<h1 class="title">
Nuxt.js tutorial
</h1>
<h2 class="subtitle">
Esempio di progetto Web costruito con Nuxt.js
</h2>
@roberto-butti
roberto-butti / Makefile
Last active August 17, 2017 14:01
Makefile to deploy your static Nuxtjs website on Github Pages
.PHONY: copy generate gitpush deploy
copy:
# rsync -rtvuc ./dist/ ../deploy/
rsync -rlpcgoDvzi --delete ./dist/ ../deploy/ --exclude-from 'exclude-list.txt'
gitpush:
cd ../deploy/ ;git add . ; git commit -am "deploy"; git push -u origin master; cd -
@roberto-butti
roberto-butti / app.js
Created May 30, 2017 05:11
Register a vue component
if (module.hot)
module.hot.accept()
import Vue from 'vue'
Vue.component('timer', require('./components/Timer.vue'));
new Vue({
el: "#app",
data: {
@roberto-butti
roberto-butti / index.html
Created May 30, 2017 05:07
custom element Vue Component
<!DOCTYPE html>
<html>
<head>
<title>Tomato</title>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.4.2/css/bulma.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div id="app">
<h1>{{ name }}</h1>
@roberto-butti
roberto-butti / Timer.vue
Created May 30, 2017 05:04
Sample Vue Component
<template>
<div class="wrapper">
<span class="timer">{{ timerFormatted }}</span>
<div class="actions">
<button @click="start">Start</button>
<button @click="stop">Stop</button>
<button @click="reset">Reset</button>
</div>
</div>
</template>