Skip to content

Instantly share code, notes, and snippets.

Roberto B 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
View jsconfig.json
{
"compilerOptions": {
"target": "ES6"
},
"exclude": [
"node_modules",
"**/node_modules/*"
]
}
@roberto-butti
roberto-butti / resize.sh
Created Dec 3, 2019
Resize image max 64px
View resize.sh
for i in $(ls -1 public/assets/img/markers/*.png);do convert $i -resize 64x64\> $(basename $i) ;done
@roberto-butti
roberto-butti / APPROVE TIMESHEET
Last active Dec 20, 2019
Click all images in the web page, with the id that begins with "approve_img_"
View APPROVE TIMESHEET
[].forEach.call(
document.querySelectorAll('img[id^="approve_img_"]'),
function(select) {
select.click();
}
)
@roberto-butti
roberto-butti / gist:ba9777d57320e772716c2121ea68dc1a
Last active Dec 2, 2019
Changing Select values as "A", for each select in page that has "id" starts with "g_"
View gist:ba9777d57320e772716c2121ea68dc1a
[].forEach.call(
document.querySelectorAll('select[id^="g_"]'),
function(select) {
select.value = 'A';
}
)
@roberto-butti
roberto-butti / main.yml
Last active Dec 18, 2019
GitHub Actions workflow for Laravel 6 (automated test)
View main.yml
name: Continuous Integration Laravel 6
on: [push]
jobs:
laravel-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Copy ENV Laravel Configuration for CI
run: php -r "file_exists('.env') || copy('.env.ci', '.env');"
- name: Install Dependencies (PHP vendors)
@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;
You can’t perform that action at this time.