Skip to content

Instantly share code, notes, and snippets.

View marciuz's full-sized avatar

Marcello Verona marciuz

View GitHub Profile
@cesarmiquel
cesarmiquel / drupal-8-cheatsheet.md
Last active April 15, 2024 18:54
Drupal 8/9/10 Cheatsheet

Drupal 8 Cheatsheet

Files, Images and Media

// Load file object
$file = File::load($fid);

// Get uri (public://foo/bar/baz.png)
$uri = $file->getFileUri();
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active April 3, 2024 06:54
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@naskobulgaria
naskobulgaria / mysql-eu-countries
Created September 30, 2015 08:31
Sql dump of all the European Countries.
/**
* Countries MySQL Tables
* Compiled by Atanas Bozhinov, 2015
*/
CREATE TABLE `eucountries` (
`country_id` int(11) NOT NULL AUTO_INCREMENT,
`code` char(2) NOT NULL COMMENT 'Two-letter country code (ISO 3166-1 alpha-2)',
`name` varchar(64) NOT NULL COMMENT 'English country name',
`full_name` varchar(128) NOT NULL COMMENT 'Full English country name',
alias wwwperm="find . \( -type d -exec chmod -v 755 '{}' \; \) -o \( -type f -exec chmod -v 644 '{}' \; \)"
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@amereservant
amereservant / googlefusionapi.php
Created October 12, 2011 04:22
PHP Google Fusion API
<?php
/**
* Google Fusion Tables API
*
* These are PHP5 classes used to interact with the Google Fusion Tables API.
* The googleBase class provides an authentication class that any classes interacting
* with the Google API will need. It should be extended by a service-specific class
* that makes all of the calls to this class.
*
* The googleFusion class provides a public 'query()' method, allowing for SQL queries