Skip to content

Instantly share code, notes, and snippets.

Roberto roberto-butti

Block or report user

Report or block roberto-butti

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@roberto-butti
roberto-butti / grid_lat_lng_geojson.js
Last active Jul 2, 2019
JS script without dependencies to generate a geojson file with a grid for latitude and longitude
View grid_lat_lng_geojson.js
var geojson = {};
geojson.type = "FeatureCollection";
var features = [];
const step = 1;
var i=0;
var feature = {};
for(i=-180;i<=180;i=i+step){
feature = {};
View .editorconfig
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
View gist:84391e94595cac82ad3e4201144714e7
{
"features": [
{
"geometry": {
"coordinates": [
12.4246,
45.5658
],
"type": "Point"
},
View Roberto_s_Workout.zwo
<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
Sample Solidity file
View prova.solidity
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 Feb 17, 2018
Prompt for ZShell (with hostname, username, path and git info)
View gist:852735dc8a42f11b15b9e21935adc7d4
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 Feb 11, 2018
Laravel will be over the top!!!
View lara_top.php
<?php
$opts = [
'http' => [
'method' => 'GET',
'header' => [
'User-Agent: PHP Laravel will be over the TOP'
]
]
];
$context = stream_context_create($opts);
View nomi.json
{
"years": [2006],
"0": [{
"year": "2006",
"name": "FRANCESCO",
"count": "10004",
"gender": "m",
"percent": "3.5204526899581"
}, {
"year": "2006",
@roberto-butti
roberto-butti / index.vue
Created Aug 21, 2017
Home page, index.vue
View 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 Aug 17, 2017
Makefile to deploy your static Nuxtjs website on Github Pages
View Makefile
.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 -
You can’t perform that action at this time.