Skip to content

Instantly share code, notes, and snippets.

View mattiaaccornero's full-sized avatar

Mattia mattiaaccornero

View GitHub Profile
@marijn
marijn / README.markdown
Last active August 27, 2024 22:31
List of nationalities in YAML, CSV and TXT format

List of nationalities

It's time someone compiled a list of nationalities to use within a web application. This gist attempts to make a first move at that.

List of countries

I've also compiled a list of countries

@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active September 15, 2024 20:33
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@landru247
landru247 / Contact Form 7: validation.css
Created April 2, 2014 16:55
Contact Form 7: validation - removes the error/success message and removes the default field validation and replaces with colored fields
div.wpcf7-response-output, div.wpcf7-validation-errors { display: none !important; }
span.wpcf7-not-valid-tip { display: none; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: red; background-color: rgba(153,0,0,0.3); }
@mauromarano
mauromarano / desktop_organizer.sh
Last active August 2, 2021 13:18
Script per tenere organizzato il desktop
#!/bin/bash
###########################################################################
# AUTHOR: Mauro Marano
# SITE: mauromarano.it/com
# Questo script serve per tenere organizzato il desktop
# Una volta impostate le variabili lui andrà a creare delle cartelle
# Per ogni tipo di file specificato.
# La cosa migliore è farlo girare con un cronjob.
# crontab -e
@nayemDevs
nayemDevs / extra-field.php
Last active September 19, 2023 16:10
Add extra field on vendor settings area and show the field value on the store banner
/*Extra field on the seller settings and show the value on the store banner -Dokan*/
// Add extra field in seller settings
add_filter( 'dokan_settings_form_bottom', 'extra_fields', 10, 2);
function extra_fields( $current_user, $profile_info ){
$seller_url= isset( $profile_info['seller_url'] ) ? $profile_info['seller_url'] : '';
?>
<div class="gregcustom dokan-form-group">
@noor-jafri
noor-jafri / deployApplication.php
Last active March 29, 2023 09:15
You can use this script to handle the Git Auto Deployment on Cloudways for any number of servers and applications using Git Webhooks.
<?php
const API_KEY = "YOUR API KEY HERE";
const API_URL = "https://api.cloudways.com/api/v1";
const EMAIL = "YOUR EMAIL GOES HERE";
/* examples
const BranchName = "master";
const GitUrl = "git@bitbucket.org:user22/repo_name.git";
*/