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 / git_command.sh
Created March 30, 2020 06:51
Some git command
# short git log: Comment, Date, Author
git log --pretty=format:'%s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
@roberto-butti
roberto-butti / here_account_oauth1.php
Last active January 11, 2021 12:55
Testing Oauth1 call
<?php
require __DIR__ . "/../vendor/autoload.php";
/**
* Thanks to clear documentation:
* https://developer.twitter.com/en/docs/basics/authentication/oauth-1-0a/creating-a-signature
*
*/
@roberto-butti
roberto-butti / jsconfig.json
Created January 20, 2020 11:07
jsconfig.json
{
"compilerOptions": {
"target": "ES6"
},
"exclude": [
"node_modules",
"**/node_modules/*"
]
}
@roberto-butti
roberto-butti / resize.sh
Created December 3, 2019 13:22
Resize image max 64px
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 December 20, 2019 14:24
Click all images in the web page, with the id that begins with "approve_img_"
[].forEach.call(
document.querySelectorAll('img[id^="approve_img_"]'),
function(select) {
select.click();
}
)
@roberto-butti
roberto-butti / gist:ba9777d57320e772716c2121ea68dc1a
Last active December 2, 2019 08:46
Changing Select values as "A", for each select in page that has "id" starts with "g_"
[].forEach.call(
document.querySelectorAll('select[id^="g_"]'),
function(select) {
select.value = 'A';
}
)
@roberto-butti
roberto-butti / main.yml
Last active December 16, 2023 23:43
GitHub Actions workflow for Laravel (automated test)
name: Laravel
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
laravel-tests:
@roberto-butti
roberto-butti / grid_lat_lng_geojson.js
Last active July 2, 2019 10:53
JS script without dependencies to generate a geojson file with a grid for latitude and longitude
var geojson = {};
geojson.type = "FeatureCollection";
var features = [];
const step = 1;
var i=0;
var feature = {};
for(i=-180;i<=180;i=i+step){
feature = {};
@roberto-butti
roberto-butti / .editorconfig
Created December 27, 2018 08:59
.editorconfig
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
{
"features": [
{
"geometry": {
"coordinates": [
12.4246,
45.5658
],
"type": "Point"
},